Description
The @page parser directive is used to specify margin values for the document in paged media such as the print media type.
The optional :left, :right, or :first selectors can be used to apply rules to left pages, right pages, or the first page.
This directive has the form:
@page [{:left|:right|:first}] {
margin rule
}
Selector Values
| Selector | Description |
|---|---|
| :first | Specified rules only apply to the first page. |
| :left | Specified rules only apply to left pages. |
| :right | Specified rules only apply to right pages. |
Examples
This example sets the default page margins to 1in.
@page {
margin:1in 1in;
}
Browser Support
| Chrome | Firefox | IE | Safari | Opera |
|---|---|---|---|---|
Miscellaneous Information
| Defined In: | CSS2 |
|---|
