How to overlap selected tab on second level tab using only css?
This is the HTML
<div class="tabcontainer" id="tabcontainer">
<ul id="tabitemscontainer1">
<li class="selected"><a href="#">item 1</a>
<ul class="level2">
<li><a href="#">sub item 1 </a></li>
<li> <a href="#">subitem 2</a></li>
</ul>
</li>
<li><a href="#">item2</a></li>
</ul>
</div>
I wrote this CSS
#tabcontainer {
height:62px;
position:relative;}
#tabitemscontainer1 > li {
-moz-border-radius:7px 7px 0 0;
background:none repeat scroll 0 0 #F0F7C1;
border-color:#EABF4A;
border-style:solid;
border-width:1px 1px 0;
float:left;
margin-right:2px;
padding:5px 10px 10px;}
#tabcontainer ul li li.selected a, #tabitemscontainer1 > li.selected > a {
color:#AE4329;
font-weight:bold;}
ul.level2 {
background:none repeat scroll 0 0 #F3F8C6;
border:1px solid #EABF4A;
left:0;
padding:6px;
position:absolute;
top:26px;
width:463px;}
#tabcontainer ul li li {
float:left;
padding:0 15px 0 4px;}
and get almost ok
I added an example here: http://jsbin.com/owana4
alt text http://shup.com/Shup/374240/110619042-My-Desktop.png
But I also need to achieve these conditions. The selected tab should overlap at the edge of the second level.
How to make this possible without using image or javascript?
alt text http://shup.com/Shup/374241/110619313-My-Desktop.png
source
share