Forum Moderators: not2easy
Check Eric Meyer's website for a solution [meyerweb.com] if you must use ems.
it's fairly a question too generic i think. in theory, that might be a good choice, in practise i often choose pixel as sizes for margins etc. and pt for fonts. sometimes even pixel for fonts.
keep in mind that pixel is a relative meassure, too, this sometimes get mixed up by accesability old-schoolers.
-hakre
Please DO NOT use ems. Internet Explorer has a terrible problem with them. If the user has their Text Size set to anything beside "Medium", the result is either unreadably small text, or unbelievably big letters.
That's how setting Text Size is meant to work: letting the user decide on how large they want the text to display. A feature, not a bug.
In principle I agree 100% ::: The problems arise when you consider how few people know where the text size settings are though.
Generaly speaking I use ems for fonts and a mixture of percentages and pixels for layout. As long as you don't go below .8em, watch your inheritance and allow plenty of room in your layout you'll not go far wron in my experience...
Nick
That's how setting Text Size is meant to work: letting the user decide on how large they want the text to display. A feature, not a bug.
I agree. But the way it has been implemented is horrendous. Believe me when I say that it makes text set to "Smaller" ridiculously small. The letters become thin lines. Set IE to "Smaller" and you cannot read the text.
Set to "Larger" and half the words don't fit on the screen. Set to "Largest" and you're talking absolutely enormous letters.
Is this what you want for your visitors? In this case it can only hinder them.
Like I said there's a solution if you must use ems.
I agree. But the way it has been implemented is horrendous. Believe me when I say that it makes text set to "Smaller" ridiculously small. The letters become thin lines. Set IE to "Smaller" and you cannot read the text.
Must be a bug in some IE versions, then. I use IE 6.0 and the biggest text size setting differs from the normal setting by a factor of less than 2, as a rough estimate.
Or might it be ca case of inheritance, where the font size for table, tr, td and p are all specified in em and IE applies the text size factor for a text in <table><tr><td><p> four times?
Hester, you can use ems for font-size, but first set the body font-size to 100%. Works fine even in IE/Win.
Just one solution, being the one given by Eric Meyer. He also gives an example of the BUG in effect, so take a look using the link I gave before. You will then see how devastating this problem can be.
If IE6 allowed pixels to be enlarged we wouldn't have to worry about using them. After all, the screen is made of pixels so we should be using the screen's measurement unit to display fonts. (See Zeldman, Jakob Nielsen et al, who have all written to Microsoft to request they allow pixels to be resized.)
I use pixels but get round the problem by offering an alternate stylesheet with larger fonts. Otherwise I would suggest to anyone concerned about font sizes to download Mozilla or Opera which both allow incremental size increases to be made.
It is a shame that the majority browser - IE - has problems in this area. Luckily IE7 won't be a problem as it's entire window contents can be enlarged smoothly. But you'll have to upgrade to the next version of Windows to get it.
Hey, I can see the browser providing something crude just in case javascript is not enabled or something but beyond that, why is it IE's job to provide granular resizability?
Or Mozilla's or OPera's or Safari's, for that matter?
I find it odd that so many people take it for granted that text resizing should take place at the browser level.
Why?
Why shouldn't authors be offering text resizing at the page level? I've seen it done in lots of sites.
One advantage of setting text size at the browser level is that a Web user who can't see well can set the text size to 'large' once, instead of once per site visited.