Forum Moderators: not2easy

Message Too Old, No Replies

Menus and "li a"

Having some problems with menu structure

         

Cyroq

3:05 pm on Jun 7, 2009 (gmt 0)

10+ Year Member



Hello,

I'm quite new to css and I try to understand it by editting existing templates. This is going well, but I encounter one problem. Part of the css of a menu looks like this:
#menu li{...css properties...}
#menu li a {...css properties...}

'menu li' seems to be the style for the main menu items, and 'menu li a' for the sub menu items. I guess this is because the sub menu items all have a <a> tag and the main menu items don't.

Now the problem is I also want to add a <a> tag to the main menu items (for a rollover). Of course now the 'menu li a' style will be used for the main menu items. Is there a way to make a distinction between the main and sub menu items, while both have a <a> tag?

I hope it is clear what I mean. Thanks in advance!

g1smd

4:10 pm on Jun 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Use the Firebug extension for Firefox to navigate the HTML 'tree'.

Look at the selectors that apply to each of your items to be styled, and then work out a way to specify each separately.