Different front page sub-background (3 posts)

  1. NancyN
    Posted 3 years ago #

    Prior discussions identified a nice way to change backgrounds for different pages, but I've run into a problem trying to use this method for a page subsection. My theme, based on TwentyEleven, needs a different frontpage #page background. Header.php looks like:

    <body <?php if (function_exists('body_class')) body_class(); ?>>
         <div id="page" class="hfeed">

    In style.css, the following isn't working, I just get the default background:

    #page.home { background-image: url(images/bg-main900.jpg); }

    The following works:

    home { background-image: url(images/bg-main900.jpg); }

    ...but of course it places the image behind the full page, and I only want it within #page.

    Thanks in advance for any suggestions on how to make this work properly.

  2. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    this is a basic css syntax problem - not a WordPress problem.

    .home #page {}


  3. NancyN
    Posted 3 years ago #

    You are SOOOO right! Thanks for the quick correction. I thought I had tried every syntax variation, but I missed that one. Thanks greatly!

    PS: I didn't mean to imply that WordPress was at fault - I LOVE this platform!

Topic Closed

This topic has been closed to new replies.

About this Topic