Tuesday, 20 February 2007

Factoid of the day - CSS trivia

The em is a unit meaning "The size of a capital M". In particular this is relative, so for nested elements it means "The size of a capital M in my parent element." What do you think happens if you have the following piece of css (which we did)? * { font-size : 0.96em; } Which is the source of a bug in some of the YUI widgets we were using which, for reasons we didn't previously understand, were getting extremely small text. This is now sorted. :-)

No comments: