Posted By

paul66 on 01/27/11


css yui fonts

Versions (?)

Font normalisation

 / Published in: CSS


To get rid of rendering inconsistencies that can occur between browsers and OS’s when rendering fonts in pixels, this snippet allows you to size your fonts in such a way that the size and line-height will remain consistent across these platforms for your website. You will basically be setting your font sizes via percentages that can be found at the YUI website.

  1. /*
  2. fonts.css from the YUI Library:
  3. Please refer to for font sizing percentages
  4. */
  5. body { font:13px sans-serif; *font-size:small; *font:x-small; line-height:1.22; }
  6. table { font-size:inherit; font:100%; }
  7. select, input, textarea { font:99% sans-serif; }

Report this snippet  

You need to login to post a comment.