HTML and CSS Reference
In-Depth Information
without further intervention, the first page of your document will have a
3-inch top margin (and an appropriate right and left margin, depending
on how your locale defines whether the first page of a document is on
the right or the left). Subsequent pages will alternate between wide and
narrow inner and outer margins. Using named pages
Once you create a named page layout, you can use it in your document
by adding the page property to a style that is later applied to an element
in your document. If an element has a page layout that is different from
that of the preceding or containing element, a page break is inserted
into the document, and formatting resumes using the new page layout.
When the scope of the element ends, the page layout reverts to the pre-
vious layout, with appropriate page breaks as needed.
For example, this style renders all the tables in your document on land-
scape pages:
@page { size : portrait }
@page rotated { size : landscape }
table { page : rotated }
While printing, if the browser encounters a <table> element in your doc-
ument and the current page layout is the default portrait layout, it starts
a new page and prints the table on a landscape page. If nontabular con-
tent follows the table, the browser inserts another page break, and the
flow resumes on the default portrait-size page. Several tables in a row
would be rendered on a single landscape sheet, if they all fit. Controlling pagination
Unless you specify otherwise, page breaks occur only when the page
format changes or when the content overflows the current page box.
Search WWH ::

Custom Search