Reply to Re: CSS font sizes - what's best to use?

Your name:

Reply:


Posted by K A Nuttall on 11/14/06 16:00

Bergamot wrote:

> So you're saying that using something like
> body {font-size: medium}
> .wrap {font-size: 62.15%}
> p {font-size: 1.2em}
>
> is easier than
> body {font-size:100%}
>
> or not setting any font-size at all? Must be that new math thing. ;)

Say the browser medium typeface is left at the common setting of
16px...

body { font-size: medium; }
#wrap { font-size: 62.5%; }
h1 { font-size: 1.9em; }
p { font-size: 1.2em; }

....would set an h1 size of 19px and a p size of 12px.

For people with a larger base font size, say 18px, h1 would be about
21px and p about 14px.

The point of reducing the wrap to 62.5% is that it's then a piece of
cake to duplicate design typeface sizes as neat multiples of 10 without
using a calculator. It's not ideal, but at least the markup is clean,
and the decimals are easy to follow.

You could equally abandon the font-size on #wrap, and recalculate h1 as
1.1875em and p as 0.75em (or using % and/or rounding if desired), but I
personally prefer the other way.

--
K A Nuttall
www.yammer.co.uk
Re-type the e-mail address how it sounds, remove .invalid

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация