Declare The Background Colour!

Declare The Background Colour!

Posted on: 01/09/2009

This is a quick tip, which is to remind everyone to always set a background colour for your body in the CSS.

body {
  background: #ffffff;
}

This might seem like stating the obvious, but there are so many sites out there (even highly recognised brands) that don’t set the background colour, and leave it to the browsers default colour. The problem with this being some browsers default to white, others to a very light grey and some will let the user set their own default colour, which they could do without realising.

A good way to remember is to set one of your testing browsers default colour to something bright, this way if you have forgotten you will be quickly reminded while browser checking.

Leave a comment

Your email is never shared. Required fields are marked *
To add code to a comment use this [code] your code here [/code]