-
AuthorPosts
-
January 27, 2015 at 8:28 pm #386551
Hi :-)
Is it possible to change the background color for only some of the sublevel menu who is placed under the main menu?Cheers!
TinaJanuary 28, 2015 at 12:11 am #386708Hi 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,
ElliottJanuary 28, 2015 at 12:42 am #386717This reply has been marked as private.January 28, 2015 at 1:03 am #386723Hei Elliot
Sorry, its the dropdown menu from the main menu I meen. its diffucult some time with the language..:-)January 28, 2015 at 4:38 pm #387094Hi Elliot
Please, will you explain a little more, what i shall do. I cant’t make it work..?Best regards Tina
January 29, 2015 at 9:14 am #387567Hey!
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,
IsmaelJanuary 29, 2015 at 11:23 am #387624Hi 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/wpCan you guide me again to solve this?
Thank you in advanced!!
Cheers!
TinaJanuary 30, 2015 at 8:22 am #388133Hey!
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!
IsmaelJanuary 30, 2015 at 4:19 pm #388300Thank you Ismael!! It works perfect, and thanks for the link!
Now there is only two issues left, and i’m finish :-)Cheers!
TinaFebruary 1, 2015 at 6:05 am #388933 -
AuthorPosts
- The topic ‘Change background color for some of the sublevel menu?’ is closed to new replies.
