You are reading an archived post from the first version of my blog. I've started fresh, and the new design and content is now at boxofchocolates.ca

Pixels as Relative Units of Measure

July 31, 2004

Conversations abound regarding whether or not using pixels for sizing text meets Checkpoint 3.4 of the Web Content Accessibility Guidelines, which tell us to use “relative units” in our CSS. Pixels are relative units, so why can’t we use them?

Quite simply – while pixels are technically a relative unit, they are relative to monitor resolution and not browser settings, and are not useful to size text.

Published over at WATS.ca, I explore Pixels as Relative Units of Measure.

Filed under:

Pixels as Relative Units of Measure

July 30, 2004

The Web Content Accessibility Guidelines, Checkpoint 3.4 suggests that we use relative units in our Cascading Style Sheets for sizing rather than absolute units for sizing items on our web sites. This applies to widths, heights, lengths, and text size.

Accordingly, accessibilty and standards advocates recommend sizing text with em units or percentages via CSS to maintain flexibility in text sizing. See Richard Rutter‘s How to size text using ems for an interesting CSS technique and the followup comments for other valuable pointers on sizing text.

Nonetheless, designers and developers have always found that pixels are the most consistent across platforms and browsers, and many still use pixels for sizing their text in their style declarations.

Pixels are Relative Units

In almost all cases when these issues arise in a forum, on a discussion list, or in the comments on a blog, someone always points to the fact that pixels are relative units. They are, indeed, correct. The W3C tells us in the CSS Specification that relative length units include em, ex, and px.

Further, they may use this fact to suggest that IE is wrong for not allowing pixel based text to resize and that in using pixels they have done their part to meet Checkpoint 3.4.

Following the letter of the law for Checkpoint 3.4 would allow us to use pixels for text sizing. However, I don’t believe that it is pragmatic to treat pixels as a relative unit like % or em, despite the fact that it may technically be a relative unit.

The size of a pixel is most definitely relative to the resolution. On my 17″ monitor at 800 x 600, I have 800 dots across, and at 1024 x 768 I have 1024 dots across. Nothing could be more obvious – pixels are a relative unit. In my opinion, using pixel units for text sizing is neither in the spirit, nor supportive of Checkpoint 3.4.

Relative to what?

Despite the fact that pixels are a relative length, on my display at 1024 x 768, a pixel is always the same size. In my every day activities I am not going to change my monitor resolution, and I doubt anyone would in the course of their normal usage.
With that in mind, here are a few questions:

  1. If I set my browser to make the text larger, and the text stays the same size, is it relative or absolute?
  2. If the text size changes, is it relative or absolute?
  3. Is it IE that is incorrectly locking down text sized in pixels, or other browsers that are incorrect for not locking it down?

Don’t get me wrong — I much prefer the behaviour of modern browsers like Firefox and Opera that allow text sized in pixels to be overridden, but I wouldn’t go so far as to say IE is flat out wrong. Can you resize a pixel without changing your monitor settings? If it does resize, isn’t it now some other number of pixels?

Pixels are a relative unit – relative to monitor resolution. % and em are relative to a browser setting, and it is the browser setting that matters for every day use, and I believe it is what matters for Checkpoint 3.4.

Filed under:

Headings, Hierarchy and Document Structure

July 22, 2004

Eric Meyer has followed up on Tomas Jogin’s post Hierarchy in his post Pick a Heading. Something Eric said struck me, so I need to post as well. He provides a code sample from Netscape DevEdge that really got me thinking about where this might go in the future:
Continue reading Headings, Hierarchy and Document Structure

Filed under:

Quotable: On Glass Ceilings

July 18, 2004

I’ve been finding quotes lately that I like and that have some “generalizability” about them — where I can substitute something from my own context into their quote. As an example, the following quote was adapted from Design’s Glass Ceiling by Rob Bennett. Fill in the blanks with pretty much whatever you want to fit your scenario – mine were all to do with accessibility. Users of modern browsers can hover to see Rob’s original words (sorry keyboard users, I’m working on it…)

Having spent the last six and a half years working in-house for financial services companies, I have seen many sides of the relationship between design and … management. One thing that's clear is that management sees design as a service rather than a collaborator to the business process, thus the value of design is frequently discounted. (If you are, in terms of the P&L, just an expense you're not valuable). Too often I've been told it isn't important for design to be in initial marketing project meetings with a client. Important enough for the writer to be there but not a designer? As I don't agree with this at all, I've had to push my way into these meetings and, personally, I'm a little exhausted from what's become essentially a solo effort.

Comments? Leave your own substituted words and phrases…

Filed under:

Slice and Dice your Access Logs

July 16, 2004

I like knowing where my readers are coming from by looking at the referrers for my sites. It gives you a better idea of your readership — not that we are identifying specific readers, but with referrers you certainly see what other sites people are reading as well, perhaps providing insight into the types of things they are reading elsewhere.

While many software packages exist to track and create statistics they don’t always provide the detail we would like to see. Using some command line tools (don’t be afraid…) you can get some very fine details from your access logs.
Continue reading Slice and Dice your Access Logs

Filed under:

These aren’t the pages you are looking for

July 11, 2004

The other day I told the story of The Case of the Missing Defensive Design. It is a story of how some other site didn’t provide default error pages, which lead a confused user that was at a dead end to do a search for the error text, which landed them on one of my sites (WATS.ca) – specifically on our Resource page that lists HTTP error/status codes and what they mean.

While preparing that post, I was checking our referrer logs looking at requests for that page. Here’s what I found:
Continue reading These aren’t the pages you are looking for

Filed under:

The Case of the Missing Defensive Design

July 9, 2004

Defensive Design encompasses a lot of key principles — one of which is rescuing users when errors occur. The guys at 37signals write:

Guideline 16:
Offer customized “Page not found” error pages

Great advice — Hopefully in the next edition, we can see it expand to include other error pages as well. Here’s why I hope so…

Continue reading The Case of the Missing Defensive Design

Filed under:

Flip it and Reverse it

July 7, 2004

I’ve often read about creativity in business and techniques for generating new ideas for products or services. One of the ideas I like to play with every once in a while is to take the way that something successful works and reverse it to get a new spin on the same idea that is novel and might have something to it. You know, something like an “inverse microwave” that freezes food really quickly that could go in everyone’s home (Perhaps Ron Popeil has already started working on it?)

Recently Mike and Paul and Matthew launched Business Logs. I believe it is a great idea, and it will take them far. The premise is to help companies and organizations work better using online communication tools. It got me to thinking…

Continue reading Flip it and Reverse it

Filed under:

Questions About Links

July 3, 2004

There has been a lot of writing these days on links, their styles and all the pseudo classes that go with them. To follow up on that with some consolidation, Simon Collison hit a few of us up the other day with some questions on linking and link styles. Via email Simon interviewed myself, Andy Clarke, Jason Santa Maria, Mike Davidson, D. Keith Robinson, Cameron Moll, and Simon Willison — “in an attempt to consolidate these views, and reflect the broad range of methods in use today.”

Thanks to Simon for putting this together and for synthesizing it all into one piece: Question Time: Visited Links. As a developer, I always find it interesting to see what others in my profession think – certainly it helps us to clarify our own understanding and to hear points of view we may not have otherwise heard.