Support » Themes and Templates » Different front page sub-background

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael


    Forum Moderator

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

    .home #page {}

    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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Different front page sub-background’ is closed to new replies.