Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Trouble creating multiple borders with pseudo elements. Reply To: Trouble creating multiple borders with pseudo elements.

#158714
paulob
Participant

HI Michael,

The dropdown menu needs a z-index to keep it on top.

nav {
    position: relative;
    z-index: 1;
}

When you start positioning things you need to control their stacking level and that is done with z-index. (only positioned elements apply z-index).

Is there a way to get the pseudo line at the right to go under the right_column_bkg.png in the right of the

I’m not quote sure what you are asking exactly because if the right border went under that background wouldn’t that be the same as not putting a border there anyway?

You can’t really have the border go half way up and then go under the background! Anyway you can’t really put anything under the background of a positioned parent. You could probably put something else on top to hide it but I don’t really understand what you want exactly.

I think I understand what you are saying although it sounds contradictory at first read.

:before and :after refer to the content in the specified element and not the element itself. You place content before something that in that element or you place something after the content in that element.