user1368371
user1368371

Reputation: 63

css background colour

My CSS file contains my webpage display, the webpage is smaller than the screen (if you know what i mean) I am trying to fill the outside of my container with a background colour but it is not working. Can anybody help with this? here is my CSS

    #container  {
    width: 900px;
    margin: 0 auto;
    }

The body/ navigation etc are below the #container, does the background colour have to be before the container? I have placed it there and it is not working?

Upvotes: 0

Views: 263

Answers (2)

The_Fritz
The_Fritz

Reputation: 452

body {} in the css refers to the complete < body > of the website. Just set the background-color there, like:

body {background-color: #fedae3;}

of course, the container needs another background-color.

Upvotes: 1

Etienne Dupuis
Etienne Dupuis

Reputation: 13786

You could apply it to the body?

body {
  background-color:red;
}

Upvotes: 4

Related Questions