Changing background color, but not content box

  • Unknown's avatar

    I’m very new to CSS so I apologize if my vernacular is off or even if this is an easy fix. I’ve figured out how to add a background color in the CSS, but it turns the entire background into that specific color. I’d like to have the body segment- the center of the blog- remain white. I presume that’s the content box? At any rate, that’s what I’d like to achieve- my content (the section from the left edge of my header to the right edge of my header, all the way down to the bottom) in white, with a different color for the background.

    And I’m curious how I’d add a photo instead of just changing the background color, but it’s best to crawl before you walk.

    Thank you for your help!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Add your background color and then add this to your custom CSS. The left and right padding put a little white space between the text and the edge of the white background.

    #page {
    background: #FFFFFF;
    padding-left: 15px;
    padding-right: 15px;
    }

    For a background image, you would create your image (make sure the “file” size is under 200k or your page will load really slowly). They go to appearance > background and you can upload the background image there.

  • Unknown's avatar

    That’s perfect, exactly what I was looking for. Thank you so much- you all do an excellent job.

  • Unknown's avatar
  • The topic ‘Changing background color, but not content box’ is closed to new replies.