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:

5 Responses

Comment by Anne — Jul 31 2004 @ 11:47 am

You might be interested in, albeit a bit out of date, About Points and Pixels as Units.

Comment by Christopher — Aug 02 2004 @ 9:41 am

You are right, every unit of measure is relative to something. The issue has never been about the pixels themselves, but rather the lack of resize support from IE. The spirit of the rule is to allow those who wish to resize the text in their browser do just that. IE won’t let you if you use pixels. If you use pixels to define text sizes and the text is too small for your reader – and they use IE – they are out of luck. This presents a problem since there are a whopping lot of folks who use IE!

As for the rest of the ways to use pixels, I think the spirit of the rule is to make sure your margins, padding, line-heights, etc. are relative to the browser window or parent container. This way if the window is resized or text size is changed the readability and functionality of the site isn’t affected. That’s why em’s are nice when used for margins and padding surrounding areas of text. They ensure that the margins, padding, and space involved with reading that text resizes ‘relative’ to the text and proportions are the same. This can’t be done using pixels in IE which is where the debate comes from mostly.

So to answer your question, it all depends upon what the units are relative to and not that they are technically relative to something. Using something that has meaning gives the relationship between units and elements on the page meaning.

Comment by Christopher — Aug 02 2004 @ 9:45 am

Ok, disregard my comments. I followed the link to your article “after” I posted. You are spot on. Hopefully it will be helpful to some one else who lands here.

Comment by Derek Featherstone — Aug 02 2004 @ 10:02 am

Hmmm… Thanks Christopher! You helped me realize a few things here — I’ve modified the post here to include more detail so that it is more clear where I stand. I asked a question at the end of my first paragraph — while it was a rhetorical question, I can see how it could easily be interpreted as a real question, as I didn’t give any indication that I already knew the answer…

Chalk it up to a few things — posting items in more than one place, and not relying on the summary that I post with each post here (it gets published in the RSS /Atom feeds, but it wasn’t echoed in my actual body post). Ahhh, more to write about, and more to do… I really must get at my to do list for this blog! ;)

Comment by Christopher — Aug 03 2004 @ 11:47 pm

Derek – No problem. Here I thought I was being insightful and I was preaching to the choir. If I remember correctly I jumped here from my RSS reader and in a hurry I dove right in instead of browsing about first.

You made the points quite eloquently in your WATS.ca post. Keep up the good work!