|
Font: em vs pt vs px vs %?
|
| View previous topic :: View next topic |
| Author |
Message |
Alex Guest Programmer
|
Everybody, I don’t understand the difference between em, pt, px, %. What I should use better in CSS-files?
Reply with quote
|
| |
|
|
musician Enthusiastic Coder
Joined: 09 Feb 2009 Posts: 27
|
Em & % are relative measures, pt & px – absolute measures. If you choose em’s or % user will be able to scale font on his browser
Reply with quote
|
| |
|
|
Alex Guest Programmer
|
Thank you musician, and you know what is prefered to use - em or %?
Reply with quote
|
| |
|
|
musician Enthusiastic Coder
Joined: 09 Feb 2009 Posts: 27
|
There are many methods of setting font size on a page...
% and Ems, being relative rather than absolute, are considered the "best" option if font resizing is required. They can be resized in almost all browsers and are driven by the user's font size preference, so users can adjust the size of content to suit their needs. This method is recommended by The Web Accessibility Initiative (WAI). The WAI Web Content Accessibility Guidelines 1.0 states
Reply with quote
|
| |
|
|
|