YUI 3.x Home -

YUI Library Examples: CSS Fonts: Setting Font Size

CSS Fonts: Setting Font Size

CSS Fonts uses a combination of keywords, filters, percentages and pixels to set its baseline font size. This approach preserves the users' ability to resize fonts via browser controls. To maintain this user option, set non-baseline sizes using percentages. This example shows how.

About This Example

Use These Percentages

If you want this size in pixels (px) Declare this percent (%)
1077
1185
1293
13100
14108
15116
16123.1
17131
18138.5
19146.5
20153.9
21161.6
22167
23174
24182
25189
26197
Note:

Because CSS examples are susceptible to other CSS on the page, this example is only available in a new window at the above link.

Copyright © 2009 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings