• I want to change the bgcolor of one of the tabs in my navigation bar. I want to make the “Home” tab’s background blue, so it stands out next to the other tabs.

    I want to change the bgcolor of the whole tab from white to black.

    Here is my site https://www.freakingkid.com
    I appreciate any help you guys can offer.

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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 https://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..

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to change one tab's bgcolor in the navigation bar,Mystique theme’ is closed to new replies.