CSS Fonts em vs px
Posted: 28 November 2007 01:07 AM   [ Ignore ]
Newbie
Rank
Total Posts:  1
Joined  2007-11-28

I am looking for some help with font sizes and I read a technique a while ago about em sizes beeing better than pixels.

You had to set the body to 60% font-size?

Does anyone have anymore information on it?

Profile
 
 
Posted: 26 December 2007 08:02 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  4
Joined  2007-12-26

When you use px you are specifying size in pixels.  When you use em you are specifying size relative to the paragraph.
With em the browser will resize the text when you say choose View - Text Size - Larger.  With PX the font size is fixed and does not grow.
http://www.bigbaer.com/css_tutorials/css_font_size.htm

Profile
 
 
Posted: 31 December 2007 04:04 PM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  38
Joined  2007-09-03
Holiday Rentals - 28 November 2007 01:07 AM

I am looking for some help with font sizes and I read a technique a while ago about em sizes beeing better than pixels.

You had to set the body to 60% font-size?

Does anyone have anymore information on it?

A very brief explanation goes like this - CSS has two broad classes of units for length, relative and absolute. em is a relative unit. px is in theory relative too - the way it is defined in the CSS standard - but in practice it turns out to be absolute.  You can read more here

http://www.explainth.at/en/css/units.shtml

Profile
 
 
Posted: 11 January 2008 03:50 PM   [ Ignore ]   [ # 3 ]
Jr. Member
RankRank
Total Posts:  36
Joined  2008-01-11

A good article on em and elastic layouts, I suggest you check it out.

Profile