Re[2]: [WSG] pt, em and ex
Sunday, November 14, 2004, 6:01:52 PM, Mordechai wrote: While pt's are fine for the print media type, when using the screen (by far the most commonly used media with CSS) pixels (px) essentially replace points. When you use points, the system has a chance to compensate for the screen resolution in use (though most don't, I accept). When you use pixels, high-res screens give tiny results. It's best to have the base set in ems (for IE compatibility reasons) and use relative sizes thereafter. Failing that, set the base in points, but not pixels. -- Iain ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re[2]: [WSG] pt, em and ex
Sunday, November 14, 2004, 8:02:50 PM, Patrick wrote: In my experience IE doesn't resize ems consistently. I've come to use % for the base (on the html), then em (on the body) Eh? That makes no sense to me. Body is a child of html. -- Iain ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re[2]: [WSG] pt, em and ex
Sunday, November 14, 2004, 8:28:45 PM, Patrick wrote: it seems that ems and percentages are interchangeable Indeed. Unless you define a unit, I think the base unit is 1em. -- Iain ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re[2]: [WSG] pt, em and ex
Barring browser weirdness for a brief utopian moment, is this the way it is supposed to work.? In order for any text to appear, someone somewhere has to have chosen a font face and size. So choosing to use relative rather than absolute units for font size moves where the decision occurs. If the stylesheet belonging to the page uses an absolute unit like pt to set the size of the base font, the browser will attempt to use the page's stylesheet to set the default font size. If the stylesheet belonging to the page instead uses the relative unit % or ems to set the size of the base font, then the browser will set the default font size relative to the local machine's default stylesheet's font size. Here 1 em behaves the same way as 100%. If the stylesheet belonging to the page instead uses the relative unit px to set the size of the base font, then the browser will set the default font size relative to the local machine's resolution. If the remainder of the font-sizes in the stylesheet are set with relative units, the page should retain the size relationships of the page's stylesheet no matter where the decision about default font size occurs. Mary Krieger Winnipeg MB Canada http://www.mts.net/~mkrieger/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **