page-break-inside

  • Revision slug: Web/CSS/page-break-inside
  • Revision title: page-break-inside
  • Revision id: 394361
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment Moved From CSS/page-break-inside to Web/CSS/page-break-inside

Revision Content

{{CSSRef}}

Summary

The page-break-inside CSS property adjusts page breaks inside the current element.

{{cssbox("page-break-inside")}}

Syntax

Formal syntax: {{csssyntax("page-break-inside")}}
page-break-inside: auto
page-break-inside: avoid

page-break-inside: inherit

Values

auto
Initial value. Automatic page breaks (neither forced nor forbidden).
avoid
Avoid page breaks inside the element.

Examples

/* avoid page break inside the paragraph */
p { page-break-inside: avoid;  } 

Specifications

Specification Status Comment
{{SpecName('CSS3 Paged Media', '#page-break-inside', 'page-break-inside')}} {{Spec2('CSS3 Paged Media')}} Allows this property on more elements.
{{SpecName('CSS2.1', 'page.html#propdef-page-break-inside', 'page-break-inside')}} {{Spec2('CSS2.1')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 {{CompatGeckoDesktop("19")}} 8.0 7.0 1.3 (312)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} {{CompatGeckoMobile("19")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

See also

Revision Source

<div>
  {{CSSRef}}</div>
<h2 id="Summary">Summary</h2>
<p>The <code>page-break-inside</code> CSS property adjusts page breaks <em>inside</em> the current element.</p>
<p>{{cssbox("page-break-inside")}}</p>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("page-break-inside")}}
</pre>
<pre>
page-break-inside: auto
page-break-inside: avoid

page-break-inside: inherit
</pre>
<h3 id="Values">Values</h3>
<dl>
  <dt>
    <code>auto</code></dt>
  <dd>
    Initial value. Automatic page breaks (neither forced nor forbidden).</dd>
  <dt>
    <code>avoid</code></dt>
  <dd>
    Avoid page breaks inside the element.</dd>
</dl>
<h3 id="Examples">Examples</h3>
<pre class="brush: css">
/* avoid page break inside the paragraph */
p { page-break-inside: avoid;  } 
</pre>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{SpecName('CSS3 Paged Media', '#page-break-inside', 'page-break-inside')}}</td>
      <td>{{Spec2('CSS3 Paged Media')}}</td>
      <td>Allows this property on more elements.</td>
    </tr>
    <tr>
      <td>{{SpecName('CSS2.1', 'page.html#propdef-page-break-inside', 'page-break-inside')}}</td>
      <td>{{Spec2('CSS2.1')}}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility" name="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 (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{CompatGeckoDesktop("19")}}</td>
        <td>8.0</td>
        <td>7.0</td>
        <td>1.3 (312)</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&nbsp;Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatGeckoMobile("19")}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="/en-US/docs/CSS/page-break-after" title="CSS/page-break-after"><code>page-break-after</code></a>, <a href="/en-US/docs/CSS/page-break-before" title="CSS/page-break-before"><code>page-break-before</code></a></li>
  <li><a href="/en-US/docs/CSS/orphans" title="CSS/orphans"><code>orphans</code></a>, <a href="/en-US/docs/CSS/widows" title="CSS/widows"><code>widows</code></a></li>
</ul>
Revert to this revision