easy blogging via #tumblr & importing shared reads as photos=gallery of bookmarks
Web Design for commercial and personal use Graphic Design identity and branding Solutions stand out from the crowd WordPress Themes just be different Contact get in touch
Home | Design | Typography

Typography

Characteristics of using em width vs. % width on text containers
Relativity

Both em and % 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.

Em

When you set your column div widths in em, as font size is changed, the relative widths of the columns stay the same, but the absolute widths only change 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 em for column widths means line lengths in characters will not vary as text size is changed. If at 12pt default in div#leftcol ‘The quick brown fox jumps over’ fits exactly all on one line, then it will do the same if the default is instead 18pt or 9pt.

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 1024×768 resolution), then the page should look proportionally identical with 32px defaults in a 2000px wide viewport (e.g. for 2048×1536 resolution).

Percent

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 12pt default in an 800px wide viewport in div#leftcol ‘The quick brown fox jumps over’ fits exactly all on one line, as text size is increased to 24pt, that line will split onto two or more lines.

reservoir-dogs

true romance

punisher_cell_original


Typography
typography in media

on May 30


Related

jQuerymiloHellgate-Londonhelvetica_black and white

Social

Design

Inspirational design and architecure| Archives

milo317¯

is a graphic and web designer based in Munich, who works with clients to create cutting edge web design. View portfolio or read on...


3oneseven

Echinger str | 80805 Schwabing | Munich | Germany

milo [at] 3oneseven [dot ] com - www.3oneseven.com

+49 173 4298898

About

I am miloIIIVII, a graphic designer and Web designer - compared to the vast amount of mediocre designs out there, I do make a difference in creating Web designs for clients because my designs are, let's say, not so ...

→ Read more...→


Top | | © MMX milo317. All rights reserved. Published in Munich.