B.99. size

This property, which can appear only within a @page at-rule (see Section A.1) lets you control the page size and/or orientation as needed.

B.99.1. Value

This property can take a number of constants, or specific page measurements.

Supported constants are:

  • auto

  • landscape

  • portrait

auto tells the browser to use a page size/orientation equal to the printer settings, while landscape and portrait force the browser to rotate the page as necessary to print in the specified orientation on the printer's paper size.

Alternatively, you can specify an exact page size with either one or two CSS length values (separated by spaces). If only one value is specified, it is used as both the width and height; otherwise, the first value is the page width ...

Get HTML Utopia: Designing Without Tables Using CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.