[EMAIL PROTECTED] wrote Thu, 09 Feb 2006 13:26:00 -0600:
 
> Also - what are the advantages/disadvantages of using em width verses %
> width on the columns?
 
I don't see anything to directly address this on the wiki home page.

Both are relative measures. The difference is what each is relative to.
Em is always relative to font size. % is relative to the containing
block, usually the body, a div, or a table, unless applied to font-size,
in which case it applies to the parent font-size.

When you set your column widths in em, as font size is changed, the
relative widths of the columns stay the same, but the absolute width
only changes when font size is changed. Whether a horizontal scoll will
appear depends on the viewport width, on the widths you set, and on the
font size actually used, which means it is possible for the font size
used to cause a horizontal scroll. Using ems for column widths means
line lengths in characters will not vary as text size is changed. If at
16px default #rightside fits exactly "They said don't try to change" all
on one line, then it will do the same if the default is instead 24px or
32px.

In contrast, when you set column widths as a % of the body, the column
widths change only when the viewport width is changed, not when font
size is changed. This means regardless of actual font size, a change in
font size won't cause a horizontal scroll. This also means the columns
can get very crowded or even inadquate in width if the actual font size
is large. If at 16px default in an 800px wide viewport in #rightside
fits exactly "They said don't try to change" all on one line, as text
size is increased to 32px, that line will split onto two or more lines.

If you design a page (with no images) using em widths to look the way
you want in a 1000px wide viewport with 16px defaults (e.g. for
1024x768 resolution), then the page will look proportionally identical
with 32px defaults in a 2000px wide viewport (e.g. for 2048x1536
resolution).
-- 
"Love your neighbor as yourself."                Mark 12:31 NIV

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://mrmazda.no-ip.com/auth/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to