YUI 3.x Home -

Site Search (YDN & YUIBlog):

# 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.

View example in new window.

### About This Example

#### Use These Percentages

If you want this size in pixels (px) | Declare this percent (%)
--- | ---
10 | 77
11 | 85
12 | 93
13 | 100
14 | 108
15 | 116
16 | 123.1
17 | 131
18 | 138.5
19 | 146.5
20 | 153.9
21 | 161.6
22 | 167
23 | 174
24 | 182
25 | 189
26 | 197

##### 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