Accessibility (dare I say it) guru (oh dear I said it) Jeffrey Zeldman recently pointed out on his blog that very few (and I’ve tested this, it is very few) websites actually specify CSS body background colours. Some of you may think “What? How stupid of them!” and some of you may think “What? Why the hell does that matter?“, well believe it or not it does matter.

Users, and I do not mean disabled users, visually impaired users or accessibility freaks but all users have the ability and many take advantage of the ability to specifiy default body background colours, font colours and font sizes among other things. This can aid readability, help colourblind users, satisfy personal preference and hell; some people just love to mess around. The problem is, by forgetting or neglecting to specify a body background colour - your website could appear as so:

User specified background colour

An exaggeration? No, not really. If you don’t believe me check out some of the reliable comments on the respective article. A surprising number of users choose to maintain a default browser background colour other than white.

Good news!

Let’s face it, all you have to to avoid this (assuming your site’s background colour is white) is to slip the following into your CSS:

body {
background-color: #ffffff;
}

No way! Yes way. Just a little something to remeber.

A note on font sizes

As I mentioned above, users can specify default font sizes and colours as well as background colours. So it’s also important to take this into account. The chances are you’ll specify a font colour naturally to suit the site, but people often dictate font sizes in pixels (and yes, I’m no exception). Always try and use ems to describe your font sizes - for more information on typography accessibility you can check out my recent post on Accessible Web Design or this fab article on A List Apart.

Spread the love:

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Blogosphere News
  • Design Float
  • Live
  • Ma.gnolia
  • Pownce
  • Reddit
  • StumbleUpon
  • TwitThis