Tag: font size

IE Does Font Sizing Right

I know I put down IE a lot on my site. As a web developer, it has made my life a living hell for the last 4 years. Some people prefer to point the finger at Firefox for starting all these compatibility issues, but for the most part it is IE that deviates from CSS specifications (and sometimes ECMAScript specs too!).

However there is one issue where Firefox is wrong. Dead wrong. So painfully wrong that I have been complaining about it for years. See, Firefox ignores CSS spec on pixel font sizes. Its reasoning is that people have misused pixel font sizes all over the web and wouldn't it be nice if old granny's could read those pages anyway? But this kind of thinking is what put IE in the mess that it's in now. You can't just ignore spec because people made their pages wrong. They are WRONG.

The reason why pixel fonts are and should be absolute is because there are times when you really need text to be absolute. When it's aligning with an image, or needs to fit inside a box. Scaling it so the user can read it may make them happier, but it makes my page look really ugly and can break a lot of other elements depending on that one to stay in its own damn area. When we say we want a box to be 300 pixels wide, you don't go scaling that, now do you, Firefox? If we wanted it scaled, we would have used "em" or percent. Don't make us use a text graphic just to force the size!

And apparently this will now be causing grief to more developers thanks to the new all-in-one advertising tool from google's adsense: http://groups.google.com/group/adsense-help-optimization/browse_thread/thread/d905b7a9b02dcf23/87844a19ac8320b1

You might say that google could make their banners scalable to overcome this, but banners have traditionally been of a fixed size and few websites can accommodate scaling sizes. The fact is, we as designers should be able to say that we want our text in some circumstances to be *just the right size*. And I am pissed off that Firefox won't let me do it. And Safari. Opera, thank god you decided to just add Zoom and skip the whole font-sizing thing. You are awesome. :)

IE High Contrast Relative Font Size Conflict

Yup, another fine IE bug.  We were getting rare and unreproducible large (HUGE!) font size complaints from users on a new page (all the old pages were just fine) and only in IE.  Customer Service - with the help of one clever user - finally tracked down the issue to the Windows XP Accessibility feature called "High Contrast."  In my futile attempts to make the new page compatible with this Windows feature, I trailed the feature's failure down to nested relative font sizes.  This is a fun one to reproduce on your own computer.  Imagine all the lovely places it will occur on your own supposedly perfect web pages!

Broken Example

Fixed Example

Switch to our mobile site