The font size of an element can be specified in pixels in the following way:
p{font-size:15px}
No minimum or maximum value is specified for font size pixel values. However, negative values are not permitted. Opera 9.5 does not render text in sizes less than 9px when the font size is declared in pixels.
Floating point numbers are allowed (example:
p{font-size:16.5px}
).However, the major web browsers differ in their handling of floating point px values.Firefox 3 and Safari 3.1 round off the font size in this manner: After the decimal point, any number greater than 4 (that is, numbers 5 to 9) is rounded off to 1px (example: 19.5px is rendered as 20px text). However, it is the floating point size that is inherited by descendant elements.
Internet Explorer 6, Internet Explorer 7, and Opera 9.6 ignore the decimal portion of the font size property's value. In these browsers, a font size value of 15.6px , for example, is considered as just 15px .
Note: Internet Explorer 6 and Safari 3.1 do not allow the user to increase the size of text that is sized with pixels. Firefox 3, Opera 9.6 and Internet Explorer 7, however, allow this with the "zoom" feature. This zoom feature also increases the size of everything else on the web page.
No comments:
Post a Comment