Monday 15 July 2002
Out, damned pixels! out, I say!
The problem of making my text resizable has been hanging over me like upcoming exam. I know that sometime this week Mark Pilgrim is going to hand out a test paper containing just one problem:
Given that you will no longer be controlling the text size in your weblog with absolute font sizes (i.e. pixels), submit a style sheet that allows readers of your weblog to resize all the text in each of the major browsers.
Today I spent a few hours cribbing from every available online source (no names, no pack drill) and I think I may have settled on an idiosyncratic mix of ems and percentages that meets the requirements. No doubt we shall soon see how theory translates into practice.
Permalink
I'd love to see how you finally do it. I've been struggling with the problem myself, and just haven't come up with a satisfactory solution.
Looks good to me so far. Your leading may have shrunk a bit, but the text looks fine.
Hint: Anything smaller than body text, use keyword xx-small. Body text and upwards, use ems based on 100%.
Perhaps I should have made it clearer that this post is simply a heads up -- I wanted to be ready to switch to relative font sizing as soon as Mark Pilgrim gave the word. Currently, I'm still using pixels.
Kris, I don't like the idea of not specifying body text sizes one little bit. The end result almost always looks like a "See Spot Run" reading primer. Thanks for the pointer to the different font sizes page. It's great to be able to see all that at a glance.
"The end result almost always looks like a 'See Spot Run' reading primer."
Perhaps. The real pain may actually be the "letting go". : )
Yes, 'small' can cause problems, but for genuinely tiny font sizes 'xx-small' works better than anything I've tried.
Why the obsession with tiny text?
Personally I set a minimum font size of not much less than my base size in my browser - bless you, Galeon authors! - and that seems to stop authors from insisting that Flyspeck Helvetica 3 is a sensible font choice.
I find that a font size explicitly set to 1.0em for the body element respects the user's setting in everything other than Unix NS4, and that font sizes larger or smaller than that can be specified in percentages or ems after that.
Well, I'm defining "tiny" here as "anything less than 12 px." I got no truck with Flyspeck Helvetica 3, and no more should anyone else.
This discussion is now closed. My thanks to everyone who contributed.
© Copyright 2002-2003 Jonathon Delacour
I'd love to see how you finally do it. I've been struggling with the problem myself, and just haven't come up with a satisfactory solution.
Posted by: John on 15 July 2002 at 12:49 AM