The cover of The Complete Idiot's Guide to Create a Web Page The Complete Idiot's Style Sheets Reference

| Index | Current Category: Fonts |
| Previous Style: font-size | Next Style: font-stretch |


font-size-adjust

A scaling factor that forces the browser to display a font with a specified aspect ratio.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS2 and later Not supported Not supported
Notes:
  • The aspect ratio is the ratio of a font's size (see font-size) and the height of the font's lowercase "x" (called the x-height).
  • The purpose of this style is to display a font at a specified aspect ratio. For example, consider the following two sans-serif fonts:
    This is MS Sans Serif text. This is Arial text.
    The MS Sans Serif text appears smaller than the Arial text. The idea is to use font-size-adjust to specify the aspect ratio of MS Sans Serif. If that font isn't available, the browser tries the fonts in the font-family list until it finds one that is installed. It then formats that font to the same aspect ratio as MS Sans Serif.
  • Unfortunately, the W3C standard is silent on how normal people are supposed to find out the aspect ratio of a given font.
Possible Values:
none
Tells the browser not to make any adjustment.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS2 and later Not supported Not supported

[number]
The aspect ratio for the font.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS2 and later Not supported Not supported

Example:
<SPAN STYLE="font-family: 'MS Sans Serif', Arial; font-size-adjust: 0.46"> 
This text will appear the same height no matter which font family is used.</SPAN>.

| Index | Current Category: Fonts |
| Previous Style: font-size | Next Style: font-stretch |