Relative versus Absolute
Relative units allow the user to specify all units relative to one or two absolute values which could aid portability and accessibility
Setting font-size as 2em sets font size to twice basic size set by the user
So improves accessibility but loses some control of appearance
x-height is critical to readability
Absolute not really absolute anyway as browser estimates what an inch is
So what should you use:
Don't use
ex
Could use
em
for text properties and
px
(for margins, images)
body {font-size: 80%} h1 {font-size: 2em} h2 {font-size: 1.5em}
If you only use one media (screen),
pt
can work pretty well
Don't mix units unless you know what you are doing
Try not to mix absolute and relative for similar unit values
Could use inches for margins etc and
pt
s for text values
Be careful with percentages; browser support can be quaint but improving!
Remember:
Relative URLs
are
relative
to the style sheet where the URL appears