I've got a css-based horizontal drop down menu that works perfectly well, but I'm having trouble adding an effect that adds a top border on the item that represents the page the user is currently on. Here's the HTML code for the dropdown:
<ul id="browse">
<li>
<a href="/comedy/">Comedy</a>
<ul>
<li><a href="/caddyshack/">Caddyshack</a></li>
<li><a href="/backtoschool/">Back to School</a></li>
<ul>
</li>
<li>
<a href="/80s/">80s</a>
<ul>
<li><a href="/diehard/">Die Hard</a></li>
<li><a href="/overboard/">Overboard</a></li>
<ul>
</li>
</ul>
Here's what I want:
Hovering over an item changes its background color, as well as the background of the dropdown (the nested ul element)
On the active page for an item, that item should have a 2 pixel tall colored border at the top.
Just to be clear, the dropdown already works fine, and I can already identify the "active" menu item. I just can't seem to figure out how to combine changing the background color on hover and adding a border-top on the active menu item without messing up the style of the menu somehow (either leaving a 2px tall blank space on hover, or having the hover background property override the border-top property on the active item)
I should also add, CSS-only solutions please.
Any help here would be much appreciated.