ThemeForest

Typography CSS

38 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 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.

801 posts
  • Sold between 250 000 and 1 000 000 dollars
  • Elite Author
  • Won a Competition
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Europe
  • Bought between 10 and 49 items
+2 more
mixey 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 4-5 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 4-5 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 4-5 years
websiteking says

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

650 posts
  • Sold between 5 000 and 10 000 dollars
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • Exclusive Author
  • Microlancer Beta Tester
itsmattadams says

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

by
by
by
by
by