em vs pixel vs %
em vs pixel vs %
Out of context: Reply #15
- Started
- Last post
- 23 Responses
- nocomply0
Obviously I try to avoid px because it does not scale in IE 6 and IE 7.
IE 6 and below have problems smoothly scaling font sizes in ems.
so here's what i do:
html {font-size: 100%;}
body {font-size: .75em;}
This sets the default font-size in most browsers to about the same as 12px.
From there I set the font size in divs using ems as necessary. For example to make the font in a side-column looks more like 11px I would do something like:
#side_column {font-size:.92em;}