38 posts
  • 7 Years of Membership
  • Affiliate Level 1
  • Collector Level 1
  • Exclusive Author
+1 more
Westernkings
says

Hi guys,

I have trouble defining font sizes in CSS so that they remain consistent, some people use PX, EMs and %, which is best ?

Ideally, lists, paragraphs, block quotes would be the same size, but using percentages, some always end up smaller than others. Can some of you share your methods of text size consistency throughout a layout, do you all define each classes font size? So .example p {} .example2 p{} etc etc ?

Do you define font size in the reset and body ? or neither ? I want to just be able to enter h3 title h3 without it being smaller than the same tag in another div and whatnot. It does my head in lol, please share.

839 posts
  • Power Elite Author
  • Winner
  • Top Monthly Author
  • Trendsetter
+10 more
wpbakery
says

I’m setting base font size in the body tag. for example font-size:0.75em; which stands for 12px.

Then define h1,h2,h3 with sizes you want… and again i em. Recently I’ve discovered http://pxtoem.com/ website. This one is really a time saver (Y)

31 posts
  • 7 Years of Membership
  • Affiliate Level 1
  • Canada
  • Collector Level 2
brenelz
says

I recently wrote a blog post about this:

http://www.brenelz.com/blog/2008/12/29/dealing-with-css-font-sizes/

-Brenelz

80 posts
  • 7 Years of Membership
  • Author Level 2
  • Collector Level 2
  • Denmark
+1 more
mads
says

I usually just set the base size to 62.5% (10px) and then define the font sizes in ems later. For example 1.2em, which equals 12px. You just move the comma – no need to do calculations every time.

41 posts
  • 7 Years of Membership
  • Collector Level 2
websiteking
says

Bah, I have no URL I can Spam with boo hoo.

709 posts
  • Affiliate Level 2
  • Author Level 5
  • Beta Tester
  • Collector Level 2
+2 more
ChillThemes
says

Here’s some useful typography tools: http://pxtoem.com/ http://www.typechart.com/

by
by
by
by
by
by