38 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+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.

831 posts
  • Power Elite Author: Sold more than $1M on Envato Market
  • Won a competition
  • Made it to the Authors' Hall of Fame
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
+7 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
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Located in Canada
  • Has collected 10+ items on Envato Market
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
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in 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
  • Has been part of the Envato Community for over 5 years
  • Has collected 10+ items on Envato Market
websiteking says

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

707 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+2 more
ChillThemes says

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

by
by
by
by
by
by