mozilla

Revision 41244 of :first

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

Revision Content

{{ CSSRef() }}

Summary

The :first page pseudo-class describes the styling of the first page when printing a document.

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 :first {
  margin: 2in 3in;
} 
Note: you may only use the absolute length units when defining the margin. Please see the page about length for more information.

Specifications

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(":left") }}
  • {{ Cssxref(":right") }}

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

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>:first</code> <a href="/en/CSS/@page" title="@page">page</a> <a href="/en/CSS/Pseudo-classes" title="Pseudo-classes">pseudo-class</a> describes the styling of the first page when printing a document.</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>
<h2 id="Examples">Examples</h2>
<pre class="brush: css">@page :first {
  margin: 2in 3in;
} 
</pre>
<div class="note"><strong>Note:</strong> you may only use the absolute length units when defining the margin. Please see the page about <a href="/en/CSS/length#Absolute_length_units" title="https://developer.mozilla.org/en/CSS/length#Absolute_length_units">length</a> for more information.</div>
<h2 id="Specifications">Specifications</h2>
<ul> <li><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></li>
</ul>
<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(":left") }}</li> <li>{{ Cssxref(":right") }}</li>
</ul>
<p>{{ languages( { "fr": "fr/CSS/:first" } ) }}</p>
Revert to this revision