Horizontal Css Menu, Different bg on childs

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
Bekker
Forum Members
Forum Members
Posts: 10
Joined: Wed Jul 06, 2011 12:31 pm

Horizontal Css Menu, Different bg on childs

Post by Bekker »

Hey guys, currently working on styling the Horizontal css menu for my site...
But i got a problem...

I want a background image on every parrent (only top level).
Thats no problem, put it under "ul#primary-nav li a"...
But now all childs also use this background... Any idea on what to do?
I tried:

Code: Select all

ul.unli li a {
	background:  none;
}
Bekker
Forum Members
Forum Members
Posts: 10
Joined: Wed Jul 06, 2011 12:31 pm

Re: Horizontal Css Menu, Different bg on childs

Post by Bekker »

Anyone?

you can see the problem here:
http://forevertan.dk/v2/

The child dropdown from Home, uses the backgound from the parrent...

And i use the standard horizontal css menu that came with the cms...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Horizontal Css Menu, Different bg on childs

Post by Dr.CSS »

When you call it in the top level it "cascades" down to the next level unless you specifically tell it not to...

ul#primary-nav li a {background: url......}

ul#primary-nav li li a {background: none}

You called it one way for top level and a different way fro second level...
Post Reply

Return to “Layout and Design (CSS & HTML)”