This is a tricky one to explain: I'm trying to get a dropdown menu that has a tab for the menu item and a wider block for the submenu. The entire menu rests on a 1px horizontal line. It's easier to explain via jsfiddle
The header has a border-bottom attribute. The navigation has a list-style-type of none, and its items are floated next to each other. This is the rollover tab:
ul li a {
color:#222222;
height:20px;
text-decoration:none;
display:block;
background:white;
padding:6px 10px 8px 10px;
border-left:1px solid #FFFFFF;
border-right:1px solid #FFFFFF;
border-top:1px solid #FFFFFF;
transition: border-color 0.23s linear;
}
ul li a:hover {
color:#FF0000;
}
ul li.toplevel a:hover, ul li.toplevel a.hoversub {
color:#FF0000;
height:19px;
border-left:1px solid #FF0000;
border-right:1px solid #FF0000;
border-top:1px solid #FF0000;
background:white;
padding-bottom:9px;
border-color:#FF0000
}
And this is the submenu tag:
ul.submenu {
position:absolute;
list-style-type:none;
width:187px;
margin:0 0 0 0;
padding:0;
display:none;
z-index:999999;
background:#FFFFFF;
/*border-top:1px solid #FF0000;*/
border-left:1px solid #FF0000;
border-right:1px solid #FF0000;
border-bottom:1px solid #FF0000;
}
The problem is (as you can see from the jsfiddle) that the top of the submenu occludes the horizontal line. If I add a border-top attribute to it, then the border continues under the tab, which I want to look continuous with the submenu.
Any ideas on how to achieve this very welcome.
EDIT: Updated the jsfiddle.