Basically you put the bottom border on the last item in the drop-down menu and the top border of the first item, and then let the item that launches the drop-down menu have a higher z index than the menu, then push the menu up menu width
#menu li:hover a {
...
position:relative;
z-index:5;
}
#menu li:hover li:first-child a{
border-top:2px black solid;
}
#menu li:hover li:last-child a{
border-bottom:2px black solid;
}
#menu li:hover ul{
position:relative;
top:-2px;
}
http://jsfiddle.net/SeXyv/14/
source
share