I’ve just realised I was being a muppet - I was editing a copy of the css file which is why it wouldn’t change.
Lawlz, still happens to me sometimes.
When you hover over the dropdown menu the hover colour of the main menu item disappears. Would you happen to know why this is? I’m not sure whether this would be more javascript related though.
It can be CSS’d except possibly not for IE6 (I forget).
Lessee, how did I do it…
I’d have a few things, but this one is the least iffy and goofy (for a ul with the id of #menu):
#menu li:hover>a {
background-color: #f60;
}
IE6 won’t see anything with a >. There may be a workaround for that (jQuery may already be doing it for IE6).
Since while you are hovering over the submenu, you are also still hovering over the li, that li’s direct child anchor should remained highlighted.
In my other menus I’ve put the bg on the li itself:
#menu li:hover {
background-color: #f60;
}
and I’ve also said “any descendant of #menu who’s hovered, their direct child anchor gets the styles”:
#menu :hover>a {
background-color: #f60;
}
For IE6 you can also use #menu li.hover a {styles} and then later override them for sub-anchors who get a different colour:
#menu ul li a:hover {new styles;}
If you’d like to add some keyboarding to the plain CSS, you’ll find that em don’t work for some reason. Because I want keyboarding to be able to work even if no JS, I used px for my margins, I made use of the + selector to say “whenever a main-level anchor is focussed on, bring the next sibling (who is the sub menu) onscreen”, and I ended up restating things like widths on :focus too.
Otherwise, what’s easier (and you should be doing it anyway) is if someone for whatever reason can’t get the dropdown to appear (lots of reasons), clicking on that main-level link (link2 in your case) brings the user to the same possible choices (sub item 1 or 2).