WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Twenty eleven theme and page background (5 posts)

  1. Negaton
    Member
    Posted 1 year ago #

    Hello,
    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 !

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

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

  3. Negaton
    Member
    Posted 1 year ago #

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

  4. HD1234
    Member
    Posted 1 year ago #

    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!

  5. HD1234
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic