CSS tips and tricks
CSS tips and tricks at The Blog Herald: "1. Size text without using pixels
If you?re wondering how some designers get font sizes to work using em as a unit rather than px, it?s easy. There is a trick that was written about a while ago (maybe on ALA) that resets the font sizes for the entire site so that 1.0em is the same as 10px.
body { font-size: 62.5% }
Simply throw the font-size: 62.5% bit into your body styling and you?re done. Now you can use ems to sizes your fonts rather than pixels.
So your paragraph styles might look something like this:
p { font-size: 1.2em; line-height: 1.5em; }
You might be wondering why it matters how you size fonts? Bulletproof design. Any major site needs to be able to withstand a user enlarging text (old people use the web too!), and setting absolute sizes is not good practice."

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home