Remember to specify a background colour

Jeffrey Zeldman recently posted Is your (website’s) underwear showing?, which is a reminder about one of my pet peeves – websites that don’t specify a background colour but have a design that relies on all browsers having a white background. When the browser background is set to something other than white, some sites look really… interesting :-).

This has been happening since forever. Back in the late 1990’s those of us who used Netscape on Macs saw a lot of it since Netscape on the Mac had a grey default background colour while Windows browsers used white. And back then “nobody” checked their sites on a Mac.

In case you don’t feel like changing the default background colour of your web browser but still want to see how strange sites can look, check out the Flickr pool Underwear showing (web design).

The solution to this is very simple: if your site is meant to have a white background, specify a white background in the CSS. It will cost you at the most 23 characters:

  1. body {background:#fff;}

Better yet, make sure the CSS you use as a starting point for new projects specifies a colour for both text and background. That way you’ll never forget to do it.

Posted on November 13, 2008 in Accessibility, Graphic Design, Usability

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.