XML technologies / CSS / Advanced websites with CSS / Using fonts with CSS / The font-size property
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
Specifying font sizes is one of the most troublesome aspects of web design because browsers differ greatly in how they interpret and display them. Before exploring this problem, let us examine the official definitions for specifying font sizes on web pages.
CSS provides seven constants for defining the property font-size:
xx-smallx-smallsmallmediumlargex-largexx-large
These values claim to describe absolute font sizes, but in practice the browser ultimately determines their numeric values. Truly absolute font sizes can be specified using the familiar method of height values in pixels or points.
The property font-size can also use relative font sizes. Available values are larger and smaller as well as percentages and em height.
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg
back to top