mozilla

Revision 50734 of :right

  • Revision slug: CSS/:right
  • Revision title: :right
  • Revision id: 50734
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment Link + styling + slightly rephrasing; 15 words added, 7 words removed

Revision Content

{{ CSSRef() }}

Summary

The :right page pseudo-class matches any right page when printing a page. It allows to describe the styling of any printed right page.

Whether the page is left or right is decided by the major writing direction of the document. For example, if the first page has a major writing direction of left-to-right then it will be a :right page and if it has a major writing direction of right-to-left then it will be a :left page.

Note: you can not change all CSS properties. You can only change the margins, orphans, widows, and page breaks of the document. All other CSS properties will be ignored.

Examples

@page :right {
  margin:2in 3in;
} 

Specifications

CSS 2.1 Paged media #page-selectors

Browser compatibility

Browser Lowest Version
Internet Explorer
8.0
Firefox (Gecko) ---
Opera
9.2
Safari (WebKit) ---

See also

  • {{ Cssxref("@page") }}
  • {{ Cssxref(":first") }}
  • {{ Cssxref(":left") }}

Revision Source

<p>{{ CSSRef() }}</p>
<h3>Summary</h3>
<p>The <code>:right</code> <a href="/en/CSS/@page" title="@page">page</a> <a href="/en/CSS/Pseudo-classes" title="Pseudo-classes">pseudo-class</a> matches any right page when printing a page. It allows to describe the styling of any printed right page.</p>
<p>Whether the page is left or right is decided by the major writing direction of the document. For example, if the first page has a major writing direction of left-to-right then it will be a :right page and if it has a major writing direction of right-to-left then it will be a :left page.</p>
<div class="note"><strong>Note:</strong> you can not change all CSS properties. You can only change the margins, orphans, widows, and page breaks of the document. All other CSS properties will be ignored.</div><h3>Examples</h3>
<pre>@page :right {
  margin:2in 3in;
} 
</pre>
<h3>Specifications</h3>
<p><a class=" external" href="http://www.w3.org/TR/CSS21/page.html#page-selectors" title="http://www.w3.org/TR/CSS21/page.html#page-selectors">CSS 2.1 Paged media #page-selectors</a></p>
<h3>Browser compatibility</h3>
<table class="standard-table"> <tbody> <tr> <th>Browser</th> <th>Lowest Version</th> </tr> <tr> <td rowspan="2">Internet Explorer</td> </tr> <tr> <td><strong>8.0</strong></td> </tr> <tr> <td>Firefox (Gecko)</td> <td><strong>---</strong></td> </tr> <tr> <td rowspan="2">Opera</td> </tr> <tr> <td><strong>9.2</strong></td> </tr> <tr> <td>Safari (WebKit)</td> <td><strong>---</strong></td> </tr> </tbody>
</table><h3>See also</h3>
<ul> <li>{{ Cssxref("@page") }}</li> <li>{{ Cssxref(":first") }}</li> <li>{{ Cssxref(":left") }}</li>
</ul>
Revert to this revision