|
| |
|
|
davidrandall
Posts: 82 Joined: 7/28/2005 Status: offline
|
Converting to em's - 6/9/2006 10:42:02
Wasn't sure whether to put this here or in accessibility as it covers both. I always use a relative font size (that can be scaled) on my sites which poses a problem when a client sends their brand guidelines with fonts specified in pixels or points. This makes using percentages very difficult for font sizes as it's pretty much trial and error to see what looks right. For this reason I now use em's. Ems are relative to the font size defined in the parent container or, if there isn't one, the browser's default. Therefore 1em is equivalent the the base font size. 2em is twice that size. As a default, a browser's font size is set at 16px so 1em = 16px. That's not a very managable number so I set the base font size to 10px. 10px/16px = 0.625 so 10px is 62.5% of 16px I set the font size on the <body> tag to 62.5%. This makes the default font size for the website equivalent to 10px. 1em now equals 10px, 1.6em = 16px and so on. Dave
|
|
|
|
caz
Posts: 3592 Joined: 10/10/2001 From: Somewhere south of Chester, UK Status: offline
|
RE: Converting to em's - 6/9/2006 14:33:25
Previously in loads of discussions about this issue some relevant sites are always mentioned, see this post in the sticky above. http://www.frontpagewebmaster.com/m.asp?m=259135&mpage=1&key=
_____________________________
Do not meddle in the affairs of cats, for they are subtle and will dance, or more on your keyboard. Cheshire cat. www.doracat.co.uk I remember when it took less than 4hrs to fly across the Atlantic.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|