Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

It’s the little things…

I am constantly surprised at the number of websites out there that don’t bother to set a background-color on their pages. Why do I care? I don’t know. But it just seems to me that it’s a detail that every web designer should attend to.

Portions of the Microsoft Developer Network site don't set a default background color

Here’s how a web site without a default background color looks to me.

You see, I like to be sure that I don’t forget to set the background color for my own sites. So, I’ve set my web browser’s default background color to a rather unattractive shade of light green. This way, I can immediately spot when I’ve forgotten it, and I can correct it right away. And, of course, it means that I also immediately spot it on other sites that I visit.

Let’s step back in time a bit — back to when the web was new, Netscape was a hot item, Internet Explorer was still trying to get its act together, and every page out there was displayed on a gray background. Then, Netscape introduced some new features which allowed web page authors to set the colors for their page background, text, and links. Colorful pages abounded! Nobody wanted to have that drab default gray anymore, so they all set their background colors to something different. (some using garish tiled background images to achieve nauseating effects). Eventually, a great number of sites settled on plain white as a background color, because it mimics the printed page, and gives the best contrast.

Now, step forward a few years, to somewhere between then and now. Internet Explorer 5.x is now on top of the heap in browser market share, Netscape 4 is all but dead, and Mozilla or Opera is the browser of choice for the web designer elite. Somewhere in there, the browser makers decided to make the default background color be white, rather than gray. This was a good thing, as now all of those pages that hadn’t been updated in years, or that had been authored by novices who didn’t know any better, or by techs who couldn’t be bothered with style, were much easier to read. But then some portion of the web designers (mostly the ones who were just coming into the game after this time, I’d guess) got lazy. If you want your page to be white, why bother setting it in your stylesheet? It’s already white in the browser, so we’ll just skip that. Even though all it would take to fix it is something like this in a stylesheet:

background-color: white;

Maybe I’m too picky. Maybe in the great overall scheme of things, it doesn’t matter. Maybe I should just set my browser’s default background color back to white and quit worrying about it. But I don’t think I will. I just want to know if the designers for the sites I visit are paying attention to the little details.

About Dougal Campbell

Dougal is a web developer, and a "Developer Emeritus" for the WordPress platform. When he's not coding PHP, Perl, CSS, JavaScript, or whatnot, he spends time with his wife, three children, a dog, and a cat in their Atlanta area home.
This entry was posted in Web Design and tagged . Bookmark the permalink.

6 Responses to It’s the little things…

  1. Mike says:

    Dougal, on my Windows machines I have the general window background set to light grey. I prefer the lower contrast it gives me.
    It also allows me to spot when designers fail to set the default background colour.
    I’m also surprised at the number of times I see a page full of images with a mixture of white and transparent backgrounds.

  2. Matt says:

    But by setting yourself up to be annoyed when people don’t set a background color, don’t you lose the right tc complain when people don’t? Setting a background color for your browser is a sign of user preference and so a funky background showing up for you is simply a sign of a website respecting your preferences instead of trying to do everything for itself.

    If anything more sites should stop using background colors. It’d be better for people like Mike who prefer the lower contrast. It’s a lot less work than creating a user stylesheet.

  3. Dougal says:

    But as Mike pointed out, if a site is incorporating images that depend on a particular background color in order to look correct, they should go to the effort to ensure that the intended effect is achieved.

    I don’t really have a problem with a site not setting a background color in general. It’s mostly the cases where it’s obvious that they designed around an expectation that wasn’t true that bugs me.

  4. As the W3 says, “If you set one colour, set them all”. Not doing so is irresponsible. If you specify a foreground colour but not a background colour, the idea of CASCADING preferences is lost.

  5. jen says:

    Just want to say thanks – you have inadvertantly solved a problem for a first-time web-builder……….and saved my sanity in the process!

    Thanks!

  6. ..]Hansen and Grossman were slated to expound on the threat and its implications at last week’s OWASP NYC AppSec 2008 Conference. They postponed their conference talk on the vulnerability at the request of Adobe and other “affected vendors,” which wanted to wait until a systemic workaround or hotfix could be applied…]

Leave a Reply

%d bloggers like this: