page-break-inside

  • Revision slug: CSS/page-break-inside
  • Revision title: page-break-inside
  • Revision id: 300131
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

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

  • {{ Xref_cssinitial() }} {{ Cssxref("auto") }}
  • Applies to block elements
  • {{ Xref_cssinherited() }} no
  • Media {{ Xref_cssvisual() }}, paged
  • {{ Xref_csscomputed() }} as specified

Syntax

page-break-inside: auto | always | avoid

Values

auto
Initial value. Automatic page breaks (neither forced nor forbidden).
always
Force a page break before the element.
avoid
Avoid page breaks before 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 to be allowed to 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 {{ CompatNo() }} 8.0 7.0 1.3 (312)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>page-break-inside</code> CSS property adjusts page breaks <em>inside</em> the current element.</p>
<ul class="cssprop">
  <li><dfn>{{ Xref_cssinitial() }}</dfn> {{ Cssxref("auto") }}</li>
  <li><dfn>Applies to</dfn> block elements</li>
  <li><dfn>{{ Xref_cssinherited() }}</dfn> no</li>
  <li><dfn>Media</dfn> {{ Xref_cssvisual() }}, <code>paged</code></li>
  <li><dfn>{{ Xref_csscomputed() }}</dfn> as specified</li>
</ul>
<h2 id="Syntax">Syntax</h2>
<pre class="eval">
page-break-inside: auto | always | avoid
</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>always</code></dt>
  <dd>
    Force a page break before the element.</dd>
  <dt>
    <code>avoid</code></dt>
  <dd>
    Avoid page breaks before 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 to be allowed to 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>{{ CompatNo() }}</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>{{ CompatUnknown() }}</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/CSS/page-break-after" title="en/CSS/page-break-after"><code>page-break-after</code></a>, <a href="/en/CSS/page-break-before" title="en/CSS/page-break-before"><code>page-break-before</code></a></li>
  <li><a href="/en/CSS/orphans" title="en/CSS/orphans"><code>orphans</code></a>, <a href="/en/CSS/widows" title="en/CSS/widows"><code>widows</code></a></li>
</ul>
Revert to this revision