XML technologies / CSS / Advanced websites with CSS / CSS property reference / page

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

The at-rule @page describes the format used to print an HTML page. In the following example, the style rule defines dimensions and crop marks for the page format querformat:

@page querformat {
 size: 11in 8.5in;
 margin: 1in;
 marks: crop;
}

The property page assigns selected elements a format defined with @page.

Inherited: yes

Values

The name used in an already defined @page rule, or auto.

Default value: auto

Compatibility

CSS version: 2

Accepted by Internet Explorer 5 for Macintosh, Netscape 6, Mozilla and Opera, but not applied by any of these browsers.

Example

The following style rule causes all div sections of the class praesentation to be printed according to the @page rule querformat (as declared above). A page break also follows each section:

div.praesentation{
 page: querformat;
 page-break-after: always;
}

  

 

 

 

back to top