Support » Themes and Templates » Twenty eleven theme and page background

  • Resolved Negaton


    I’m customising a theme based on twenty eleven
    Beginner in wordpress, I wonder how to change the background color of the content area of the pages, without any change on my home page that have to keep its white background.
    I have found body_class() functionnality and so added lines in my css like :

    .page {
    	    background-color: #BD9802;

    When I see the result in my web site, it doesn’t work as I want due to a css style that override mine
    #page {... background-color: rgb(255,255,255);...}
    I can not find where this style is stored but when disabling it in my browser, the background-color I want appears where I want.

    Thanks for any idea to find this css line !

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


    Forum Moderator

    try to style:
    .page #page { ... }

    .page is a body_class() output indicating that you are viewing a static page;
    as this is applied to the body tag, it will style the whole browser background;

    #page is the css id of the outer most div in the theme;
    this will style the actual ‘page’ as in ‘web-page’.

    Thank you for the explanation and for the tip : it works perfectly

    just tried adding:

    .page #page {
    background-color: #BD9802;

    to my 2011 child style.css and it works! Only problem is that it didnt change the footer area color… Anyway, thanks for the tip!

    Also, didnt change the wp e-commerce product pages background color :// I guess that would be somewhere in the wpsc .php or .css files?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Twenty eleven theme and page background’ is closed to new replies.