XML technologies / CSS / Advanced websites with CSS / CSS property reference / size
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The property size describes the size or format of the printed version of an HTML page. size is declared only in at-rules.
Values
One or two CSS measurements separated by spaces. A single value applies to both height and width of a printed page. With two values, the first specifies the height and the second the width. Alternatively, the following constants can define the page format:
autolandscapeportrait
The constant auto tells the browser to use its default setting for printing a page. The constants landscape and portrait specify landscape and portrait printing respectively.
Default value: auto
Compatibility
CSS version: 2
Not supported by any current browser.
Example
The following rule specifies that a page is printed in landscape DIN A4 format (21 × 29.7 cm):
@page {
size: 21cm 29.7cm;
}
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