IE 9 does not resize text sized in pixels
456bereastreet.com
456bereastreet.com
Sometimes I need text to match size of background-image that is not scaled and has size in pixels (especially important if you use CSS sprites).
In other places I can use `em` to signify that text can be freely enlarged and won't break layout.
iPhone and WP7 IE have -(webkit|ms)-text-size-adjust for this.
[1]Because 'px' doesn't refer to pixels.
[2]It refers to a unit that scales according to display resolution and usual distance from eye; essentially it's a measure of the angle subtended on your retina. This is useful because (in theory) 1px will look "the same size" (and be about as legible) on a mobile phone, on a laptop, on a desktop, or on a projector, whereas 1in or 1pt(=1/72in) will appear much smaller if further away. What 1px is not, however, is a "pixel".
On a related note, I still haven't seen any full-viewport HTML5 apps that don't break terribly on zoom in some/all browsers. It really is a terribly tricky behavior to understand, and probably the least consistently implemented.
FYI, IE invented full page zoom. The "cool kids" wisely borrowed it from IE for their browsers.
If so, there is at least one thing Opera did not have before the other browsers. Guess what?
http://www.opera.com/docs/history/
IE was 10 years late to the party.
I speculate that the other browsers opted to make 'px' text resizable because a large number of sites use 'px' text, perhaps inadvertently due to lack of accessibility testing. So for these sites it's more user-friendly to make 'px' text resizable, than forcing the user to zoom the whole page.
You can do font-size: 76.5%; for the html element, and font-size: 14px; for body, and it should resize (because the base is set in a relative unit).
CognitiveLens is right. Proportions matter.
(Note: when I say "you", I refer to the "one [who] wants a pixel-perfect layout" which may or not actually be you.)
So, if this is the case, then "px" units and raster graphics should not belong on the Web, too. But unfortunately, they do.
IMHO, the best approach would be to have two zoom modes. Some users prefer scaling text, but keeping images inact (so they won't see upscale ugliness), others prefer "screen magnifier"-like behavior. And none of those behaviors is wrong.
From CSS2 spec:
"Relative units are: * em: the 'font-size' of the relevant font * ex: the 'x-height' of the relevant font * px: pixels, relative to the viewing device"
Changing font size doesn't affect your device (browser), but zooming does.
But I think this greatly undermines accessibility, and accessibility is way more important than pixel-perfect layouts.