WordPress assigns a specific class to each tab in a menu automatically. Just check your source code to find it.
viewing your source code I can see that your home button has a li class of home
Additionally it has a li class of active when you are actually on the home page
So,
li.home {
background-color: #000000;
}
would change the color of the button in its inactive state (when you are on another page…the light grey)
and
li.home .active {
background-color: #000000;
}
will change the darker grey color of the home buttom (the color of the home button when you are on the home page.
and, sometimes css can be a pain and you need to be more specific, if so you can add .navigation to your css
.navigation .home {
background-color: #000000;
}
.navigation .home .active {
background-color: #000000;
}
`
Thread Starter
Tunto
(@duke7891)
thanks for the info but could you please be more specific. i mean what file you are talking about, where i should put these code.is it style.css or something else.please guide me.
yes, it’s css, so it would go in your style.css
Its probably not too important where you put them, but to keep related stuff together, I would add them in the navigation section
Thread Starter
Tunto
(@duke7891)
yeah i have copied these code exactly as you said but nothing happened..
Here’s the website in example http://www.zerokillers.co.uk/, see the nav bar, the whole black navigation bar and if you hover any page item it will give you a grey effect.i want to have like this one. please give me the exact code and and which script i have to put it in and where.
I would be very glad if you help me out..