38 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United Kingdom
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.

821 posts
  • Power Elite Author: Sold between 1 000 000 - 1 999 999 dollars
  • Power Elite Author
  • Won a Competition
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Europe
  • Bought between 50 and 99 items
+2 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
  • Bought between 10 and 49 items
  • Canada
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
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
  • Bought between 10 and 49 items
  • Denmark
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 100 and 1 000 dollars
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
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
websiteking says

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

707 posts
  • Sold between 10 000 and 50 000 dollars
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • Exclusive Author
  • Envato Studio (Microlancer) Beta Tester
ChillThemes says

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

by
by
by
by
by
by