WordPress.org

Forums

[resolved] Container for content to change the background (7 posts)

  1. yadesuyi
    Member
    Posted 2 years ago #

    Hi, I want to be able to change the background color of my site, but there is no div wrapping up the content. As you can see, http://www.lovexlife.com. So I wanted to create a container for the whole content so I can change the background, something like this site, wwww.hypebeast.com

    Im not exactly sure what codes I have to put in the style.css and index.html to do this, can anyone help me?

  2. WPyogi
    Forum Moderator
    Posted 2 years ago #

    Yes, there is a wrapper div on your site (id is #warpper -- yes it is misspelled in the theme) -- you could change that background to white and then the body div to a color and you'd have the same effect as the site you linked to.

  3. yadesuyi
    Member
    Posted 2 years ago #

    I put this into the style.css,

    #body {
    background-color:#000000;
    }

    To make the background black, however nothing changed in the site

  4. WPyogi
    Forum Moderator
    Posted 2 years ago #

    That's because body is not an id -- it's a tag -- so get rid of the # .

  5. yadesuyi
    Member
    Posted 2 years ago #

    Oh okay, it worked but it made the whole page black including the content in the wrapper for some reason, which is weird because when I made the background color of the wrapper black it only affected the content section.

  6. WPyogi
    Forum Moderator
    Posted 2 years ago #

    None of that is weird - it's how CSS works. You need to set the wrapper to white and the body to black.

    Try using Firebug to work with CSS and look at this page for a reference on CSS:

    http://www.w3schools.com/css/

  7. yadesuyi
    Member
    Posted 2 years ago #

    Nice that is perfect, thank you so much for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic