Hi :-)
Is it possible to change the background color for only some of the sublevel menu who is placed under the main menu?
Cheers!
Tina
Hi Tina62!
Yes, the CSS would look like this.
#menu-item-883 > .sub-menu a {
background: none repeat scroll 0 0 red;
}
Or if you want to target each one separately then do this.
#menu-item-157 { background: red !important; }
Best regards,
Elliott
Hei Elliot
Sorry, its the dropdown menu from the main menu I meen. its diffucult some time with the language..:-)
Hi Elliot
Please, will you explain a little more, what i shall do. I cant’t make it work..?
Best regards Tina
Hey!
Please try this:
#menu-item-883 > .sub-menu a {
background: blue;
}
The #menu-item-883 is the id of the “UTDANNELSER” menu item. Use chrome inspect element or firebug to get the proper menu id selector.
Regards,
Ismael
Hi Ismael!
Thank you so much for your respond! I still dont get it, sorry :-/ I try to explain it more specific.
I want menu background color to be this: #c0d6b1- but only for this 4 drop down-menu: Innføringskurs, Grunnutdannelse, Coachutdannelse, Psykoterapiutdannelse.
The parent-pageid for the dropdown menu is 884 (Utdannelser). The site is: http://www.psykosyntese.no/wp
Can you guide me again to solve this?
Thank you in advanced!!
Cheers!
Tina
Hey!
Use css child selectors: http://css-tricks.com/how-nth-child-works/
#menu-item-883 > .sub-menu li:nth-child(-n+4) a {
background: #c0d6b1;
}
Cheers!
Ismael
Thank you Ismael!! It works perfect, and thanks for the link!
Now there is only two issues left, and i’m finish :-)
Cheers!
Tina