The JSSTag.fontSize property corresponds to the font-size CSS property. It controls the size of the text as it appears on the screen.
This is notoriously unportable and text always looks smaller on a Macintosh than it does on a Windows system. This is because the native screen resolution of a Macintosh is 72 dpi and a Windows system is 96 dpi.
You can specify the size in a variety of ways. There are four classifications for the font size value:
Length
Percentage
Absolute size
Relative size
The length value can be specified in units of measure as follows:
Points - e.g. 12pt
Millimetres - e.g. 0.4mm
Pixels - e.g. 16px
The percentage value is computed relative to the enclosing object's corresponding property (hence the cascading effect of style sheets). A percentage value is indicated with an integer followed by a percent sign, for example 120%.
The absolute size is based on the browser knowing the screen display resolution and computing some preferred font sizes. It is specified using the following keywords:
xx-small
x-small
small
medium
large
x-large
xx-large
Note that some of the smaller sizes render so small on a Macintosh as to be unreadable.
The relative sizing is controlled by the two keywords:
larger
smaller
You can use a combination of absolute and relative sizing or any combination of sizes as this property is cascaded down through the styles.
The default value for this property is "medium".
This value is inherited from its parent container element.
Deprecated for any further use. This was available only in Netscape 4.0 and is completely removed from Netscape 6.0.
See also: | Measurement units, style.fontSize |
Prev | Home | Next |
JSSTag.fontFamily | Up | JSSTag.fontStyle |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |