:left

  • Revision slug: CSS/:left
  • Revision title: :left
  • Revision id: 40991
  • Created:
  • Creator: brianloveswords
  • Is current revision? No
  • Comment one or more formatting changes

Revision Content

{{ CSSRef() }}

Summary

The :left page pseudo-class matches any left page when printing a page. It allows to describe the styling of left-side pages.

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't change all CSS properties. You can only change the the margin, padding, border, and background properties of the page box. All other CSS properties will be ignored, and only the page box, not the document content on the page, will be affected.

Examples

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

Specifications

CSS 2.1 Paged media #page-selectors

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatUnknown() }} {{ CompatNo() }} 8.0 9.2 {{ CompatUnknown() }}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatNo() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

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

{{ languages( { "fr": "fr/CSS/:left" } ) }}

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>:left</code> <a href="/en/CSS/@page" title="@page">page</a> <a href="/en/CSS/Pseudo-classes" title="Pseudo-classes">pseudo-class</a> matches any left page when printing a page. It allows to describe the styling of left-side pages.</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 <code>:right</code> page and if it has a major writing direction of right-to-left then it will be a <code>:left</code> page.</p>
<div class="note"><strong>Note:</strong> You can't change all CSS properties. You can only change the the margin, padding, border, and background properties of the page box. All other CSS properties will be ignored, and only the page box, not the document content on the page, will be affected.</div>
<h2 id="Examples">Examples</h2>
<pre>@page :left {
  margin:2in 3in;
} 
</pre>
<h2 id="Specifications">Specifications</h2>
<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>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatNo() }}</td> <td>8.0</td> <td>9.2</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody> </table>
</div>
<div id="compat-mobile"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Mobile</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody> </table>
</div>
<h2 id="See_also">See also</h2>
<ul> <li>{{ Cssxref("@page") }}</li> <li>{{ Cssxref(":first") }}</li> <li>{{ Cssxref(":right") }}</li>
</ul>
<p>{{ languages( { "fr": "fr/CSS/:left" } ) }}</p>
Revert to this revision