• Resolved nhbergh

    (@nhbergh)


    I am using a twenty twelve child theme. http://globalwater.server268.com/

    I have successfully added a background image to the main.navigation for my site, that works great for all the pages except the homepage, for which I have a different header-banner.php file and a different header image.

    As you will see, if you look at the homepage, I need to put a different background image in the “main.navigation” class. But ONLY for that one page.

    I think the problem may be my ignorance of custom CSS codes and how to specify “main.navigation” to be different on the “front-page.php” template. I have been trying many possibilities, but so far, not successful.

    Thanks for any help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The home page will always have a body class of home, so you can add a CSS rule with the body.home selector to get a different background for your menu:

    body.home .main-navigation
    {
    background-image: /images/home-menu-bkgrnd.jpg;
    }

    Thread Starter nhbergh

    (@nhbergh)

    Super! It works now. Thank you very much for your assistance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘main.navigation background different for homepage?’ is closed to new replies.