Prev | Current Page 94 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"


In its simplest form, the at-rule is
followed by a block of margin
declarations:
@page {
margin: 1in 1.5in;
}
SPEC
CSS2
BROWSER SUPPORT
Op9.2+ Saf3 FF2 IE7
FULL NONE NONE NONE
Example
This example sets default page margins:
@page {
margin: 1in 1.5in;
}
53 At-rules Reference
You can specify different margins for all left-hand pages, all right-hand pages, or
for the first page, by inserting a page selector between the at-rule and the block. The
page selector is one of three pseudo-classes. Let??™s look at an example that shows
how these pseudo-classes can be used:
@page {
margin: 2.5cm; /* default for all pages */
}
@page :left {
margin-left: 5cm; /* left pages only */
}
@page :right {
margin-right: 5cm; /* right pages only */
}
@page :first {
margin-top: 8cm; /* extra top margin on the first page */
}
Compatibility
Opera Safari Firefox Internet Explorer
9.2 3.0 2.0 1.3 2.0 1.5 1.0 7.0 6.0 5.5
Full None None None None None None None None None
This at-rule is currently only supported by Opera 9.


Pages:
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106