• I have 960pc wide main body including the sidebar which I want to keep white. Outside of this area I want the background to be gray. How do I write the CSS to accomplish this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • A link to your site would help, so that we can see what’s going on.

    And can you confirm which area it is you want to have a grey background? Are you talking about everything outside of the sidebar? Or just the main content area? Or the entire body of the page?

    Cheers

    PAE

    Thread Starter tmattias

    (@tmattias)

    The site only exist on my computer at the moment so can not link to it.

    I want everything outside of the main body and sidebar to be gray.

    Well, I’m guessing of course since we’re doing this blind: but I guess you want to set the background colour on everything the outside of the main page content area, rather than the page body, because there is nothing outside of the page body, except the <html> element, which doesn’t count.

    You should really make all your changes in a Child Theme. If you’re using a default theme like twentyeleven, it is essential that you use a child theme.

    Having said that, I imagine you’ll need a rule like:

    body {
      background-color: #CCCCCC;
    }

    This assumes that only the <body> element is outside of the main page content area.

    Of course if your main content is full width, then you won’t see anything and you may have to set a width on the main content and centre it, if that’s what you want.

    HTH

    PAE

    Thread Starter tmattias

    (@tmattias)

    Thank you, I will try this out!

    I forgot to mention that I’m using the Cillibox theme (http://themeforest.net/item/chillibox-premium-wordpress-theme/509578)

    Can I use the method you described above with this theme?

    for a commercial theme like yours, the best is to contact the theme vendor for support.

    help through this forum is virtually impossible as the theme files are not freely accessible.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Different colors at the sides’ is closed to new replies.