I am trying to make the sidebar menu overlap content divwhere the active menu item is displayed above divand the inactive items appear below. The intersection between a uland divwould be small, but the interleaving effect would create an illusion of depth.
I understand that it z-indexapplies only to brother elements. So the following does not work:
#menu {z-index:0}
#menu li.active {z-index:2}
#content {z-index:1}
<ul id="menu">
<li class="active">Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<div id="content">Side content</div>
Is there a good way to do this without making each menu item divat the same level as #content?
Patrick rodriguez
source
share