CSS break-inside Property

The break-inside property controls whether page, column, or region breaks are allowed or avoided within an element.

It is commonly used to keep related content together when printing documents or arranging content in multiple columns. For example, you can discourage a browser from splitting a figure, card, or table row across two printed pages.

Unlike break-before and break-after, this property controls breaks inside an element rather than at its boundaries.

break-inside Syntax

Use break-inside to control whether an element may be divided across fragments.

selector {
  break-inside: avoid;
}

The general syntax is:

selector {
  break-inside: auto | avoid | avoid-page | avoid-column | avoid-region;
}

Automatic Breaks

.section {
  break-inside: auto;
}

Avoid Breaks

.card {
  break-inside: avoid;
}

Avoid Page Breaks

.print-section {
  break-inside: avoid-page;
}

Avoid Column Breaks

.column-card {
  break-inside: avoid-column;
}

Avoid Region Breaks

.region-section {
  break-inside: avoid-region;
}

CSS-Wide Keywords

.inherited {
  break-inside: inherit;
}
.reset {
  break-inside: initial;
}
.unset {
  break-inside: unset;
}
.reverted {
  break-inside: revert;
}
.layer-reverted {
  break-inside: revert-layer;
}

The property accepts one break-control keyword or one CSS-wide keyword per declaration.

Unlike break-before and break-after, break-inside does not accept forced break values such as page, column, or always.

Property Values

The break-inside property has five break-control values.

Value Description
auto Allows the browser to determine where breaks may occur inside the element. This is the initial value.
avoid Requests that page, column, and other applicable fragmentation breaks be avoided inside the element.
avoid-page Requests that page breaks be avoided inside the element.
avoid-column Requests that column breaks be avoided inside the element.
avoid-region Requests that region breaks be avoided inside the element.

All avoidance values express preferences. The browser may still divide content when necessary to complete the layout.

CSS-Wide Keywords

Value Description
inherit Uses the computed value from the parent element.
initial Resets the property to auto.
unset Resets the property to auto because it is not inherited.
revert Reverts the property according to cascade origin rules.
revert-layer Reverts the property according to cascade layer rules.

Property Characteristics

Characteristic Value
Initial value auto
Inherited No
Applies to Boxes in normal flow that establish formatting contexts, including applicable block, grid, and flex containers
Computed value Specified keyword
Animation type Discrete
Percentages Not applicable
Primary use Preventing unwanted fragmentation in printed pages and multi-column layouts

The property does not change an element's dimensions or directly create a new page or column. It influences whether breaks may occur inside the element.

How It Works

When content flows across pages or columns, the browser identifies possible locations where it can divide that content.

Step 1: Create a Content Group

<div class="content-card">
  <h3>Example Card</h3>
  <p>This paragraph belongs to the card.</p>
  <p>This paragraph should remain with it.</p>
</div>

Step 2: Add an Avoidance Rule

.content-card {
  break-inside: avoid;
}

The browser attempts to keep the entire card in one fragment.

Step 3: Apply the Rule to Printed Pages

@media print {
  .content-card {
    break-inside: avoid-page;
  }
}

This specifically discourages page breaks within the card when printing.

Step 4: Apply the Rule to Columns

.article {
  column-count: 2;
}
.content-card {
  break-inside: avoid-column;
}

The browser attempts to keep the card within a single column.

Step 5: Account for Available Space

If the card does not fit in the remaining space, the browser may move it to the next page or column. If the card is too large for a single fragment, the browser may need to split it despite the avoidance rule.

The property is most effective when the content group can reasonably fit within one fragment.

Automatic Breaks

The auto value allows normal fragmentation inside an element.

.article-section {
  break-inside: auto;
}

Automatic Page Breaks

@media print {
  .article-section {
    break-inside: auto;
  }
}

The browser may divide the section between printed pages when necessary.

Automatic Column Breaks

.article {
  column-count: 3;
}
.article-section {
  break-inside: auto;
}

The section may continue into another column as the browser distributes content.

Reset an Avoidance Rule

.card {
  break-inside: avoid;
}
.card.allow-breaks {
  break-inside: auto;
}

Cards with the allow-breaks class return to automatic fragmentation.

When to Use auto

Use auto when splitting content is acceptable or when a previously applied avoidance rule should be removed.

Because auto is the initial value, it does not need to be declared unless it overrides another rule.

Avoiding Breaks

Avoidance values discourage the browser from dividing an element across fragments.

Avoid Applicable Breaks

.card {
  break-inside: avoid;
}

The browser attempts to keep the card together across applicable fragmentation contexts.

Avoid Page Breaks

@media print {
  .card {
    break-inside: avoid-page;
  }
}

Avoid Column Breaks

.columns .card {
  break-inside: avoid-column;
}

Avoid Region Breaks

.region-content {
  break-inside: avoid-region;
}

Region-related values have limited practical support in modern browsers.

Avoid vs. avoid-page

The avoid value requests avoidance of applicable break types, while avoid-page specifically targets page breaks.

Avoid vs. avoid-column

The avoid-column value specifically discourages column breaks. It does not express the same general avoidance preference as avoid.

Avoidance Is Not Absolute

The browser may still insert a break when content cannot fit or when a forced break takes precedence.

Choose the most specific avoidance value when the layout requires control over a particular fragmentation type.

Page Breaks

The avoid-page value requests that an element remain on a single printed page.

Keep a Figure Together

@media print {
  figure {
    break-inside: avoid-page;
  }
}

Keep a Card Together

@media print {
  .card {
    break-inside: avoid-page;
  }
}

Keep a Table Row Together

@media print {
  tr {
    break-inside: avoid-page;
  }
}

Table row fragmentation behavior can vary by browser and print engine.

Keep a Short Section Together

@media print {
  .short-section {
    break-inside: avoid-page;
  }
}

Printable Report

@media print {
  .report-card,
  .report-summary,
  figure {
    break-inside: avoid-page;
  }
}

When Content Is Too Large

If an element is taller than the available page area, the browser may have to split it even when avoid-page is specified.

Use Print Preview to confirm that the content groups remain together as intended.

Column Breaks

The avoid-column value requests that an element remain within one column of a multi-column layout.

Basic Multi-Column Layout

.article {
  column-count: 2;
  column-gap: 30px;
}

Keep Cards in One Column

.article .card {
  break-inside: avoid-column;
}

HTML Example

<div class="article">
  <div class="card">
    <h3>First Card</h3>
    <p>Related content stays together.</p>
  </div>
  <div class="card">
    <h3>Second Card</h3>
    <p>This card should not split between columns.</p>
  </div>
</div>

Three-Column Layout

.article {
  column-count: 3;
  column-gap: 24px;
}
.article .card {
  break-inside: avoid-column;
}

Column Balancing

.article {
  column-count: 3;
  column-fill: balance;
}

Column balancing and break avoidance influence how content is distributed among the available columns.

Available Space

If a card does not fit in the remaining column space, the browser may move it to another column. If the card is too large to fit within a single column, splitting may still occur.

Column break avoidance is useful for article cards, short sections, quotations, and other grouped content.

Region Breaks

The avoid-region value was designed to discourage breaks inside an element when content flows through CSS regions.

Region Break Avoidance

.region-card {
  break-inside: avoid-region;
}

Intended Behavior

The browser would attempt to keep the element together within one region rather than dividing it between regions.

Browser Support Limitations

CSS Regions are not supported as a standard, interoperable feature in modern mainstream browsers.

The avoid-region value is therefore primarily useful as reference information rather than a dependable production technique.

Modern Layout Alternatives

CSS Grid, Flexbox, and multi-column layout can organize content into different areas, although they do not reproduce the same region-flow behavior.

Keeping Content Together

One of the most common uses of break-inside is keeping a group of related elements within the same page or column.

Keep a Card Together

.card {
  break-inside: avoid;
}

Keep a Heading and Paragraph Together

<section class="content-group">
  <h3>Section Heading</h3>
  <p>This paragraph belongs with the heading.</p>
</section>
.content-group {
  break-inside: avoid;
}

Keep an Image and Caption Together

<figure class="image-group">
  <img src="example.jpg" alt="Example illustration">
  <figcaption>Example image caption.</figcaption>
</figure>
.image-group {
  break-inside: avoid;
}

Keep a Quote Together

blockquote {
  break-inside: avoid;
}

Keep a List Item Together

@media print {
  li {
    break-inside: avoid-page;
  }
}

Keep a Summary Together

@media print {
  .summary-box {
    break-inside: avoid-page;
  }
}

Grouping related content inside a common container makes it easier to apply a single avoidance rule.

For long content groups, allow normal fragmentation rather than attempting to keep an entire section on one page.

Tables and Figures

Tables and figures often contain information that becomes difficult to read when divided across pages.

Avoid Splitting a Figure

@media print {
  figure {
    break-inside: avoid-page;
  }
}

Avoid Splitting Table Rows

@media print {
  tr {
    break-inside: avoid-page;
  }
}

Avoid Splitting a Small Table

@media print {
  .small-table {
    break-inside: avoid-page;
  }
}

Figure with Caption

<figure class="report-figure">
  <img src="chart.png" alt="Monthly traffic chart">
  <figcaption>Monthly traffic results.</figcaption>
</figure>
@media print {
  .report-figure {
    break-inside: avoid-page;
  }
}

Table Header Repetition

@media print {
  thead {
    display: table-header-group;
  }
  tr {
    break-inside: avoid-page;
  }
}

Repeated table headers can help readers understand tables that span multiple pages. Actual repetition behavior depends on the print engine.

Large Tables

A table that exceeds one page must generally be allowed to continue across pages. Applying break-inside: avoid-page to an entire large table may be ineffective or produce undesirable spacing.

Apply avoidance rules to smaller logical groups, such as rows or figures, whenever possible.

Multi-Column Layouts

In multi-column layouts, break-inside helps prevent cards and other content groups from being divided between columns.

Two-Column Layout

.cards {
  column-count: 2;
  column-gap: 20px;
}
.cards .card {
  break-inside: avoid;
}

Three-Column Layout

.cards {
  column-count: 3;
  column-gap: 24px;
}
.cards .card {
  break-inside: avoid-column;
}

Responsive Columns

.cards {
  columns: 220px;
  column-gap: 20px;
}
.cards .card {
  break-inside: avoid;
}

The browser determines how many columns fit within the available width.

Card Spacing

.cards .card {
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid #cccccc;
  break-inside: avoid;
}

Column Balancing

.cards {
  column-count: 3;
  column-fill: balance;
}

Break avoidance may leave some columns with unused space because a card is moved to another column rather than divided.

Column Layout vs. Grid

Multi-column layout flows content from one column to the next. CSS Grid arranges items in rows and columns using a different layout model.

The break-inside property is especially useful for multi-column content, but it does not replace Grid or Flexbox item placement controls.

Print stylesheets allow break avoidance rules to be applied specifically to printed documents.

Basic Print Rule

@media print {
  .card {
    break-inside: avoid-page;
  }
}

Figures and Captions

@media print {
  figure {
    break-inside: avoid-page;
  }
}

Table Rows

@media print {
  tr {
    break-inside: avoid-page;
  }
}

Headings and Following Content

@media print {
  h2,
  h3 {
    break-after: avoid-page;
  }
}

The break-after rule is more appropriate when the goal is to keep a heading with the content that follows it.

New Chapters

@media print {
  .chapter {
    break-before: page;
  }
}

Combined Print Rules

@media print {
  .chapter {
    break-before: page;
  }
  h2,
  h3 {
    break-after: avoid-page;
  }
  figure,
  .summary-box {
    break-inside: avoid-page;
  }
}

Page Margins

@page {
  margin: 20mm;
}

The @page rule controls page-box settings, while fragmentation properties control where content may be divided.

Always inspect Print Preview because page size, margins, fonts, and browser implementation can affect the final result.

Break Priority and Conflicts

Break avoidance is evaluated alongside forced breaks and other fragmentation rules.

Three Related Properties

  • break-before controls breaks before an element.
  • break-after controls breaks after an element.
  • break-inside controls breaks within an element.

Avoid Breaks Within a Container

.group {
  break-inside: avoid-page;
}

Forced Break Between Children

.group {
  break-inside: avoid-page;
}
.group .new-section {
  break-before: page;
}

The forced page break can take precedence over the container's request to avoid page breaks.

Break After a Child

.group {
  break-inside: avoid-page;
}
.group .section-end {
  break-after: page;
}

A forced break after a child may divide the containing group despite its avoidance rule.

Break Precedence

At a potential break boundary, forced breaks take precedence over avoidance requests. When multiple forced break values conflict, break-before has priority over break-after, followed by applicable break-inside constraints.

Insufficient Space

Even without a forced break, the browser may need to divide content when no acceptable unbroken placement is possible.

Keep break rules simple and avoid combining forced breaks with conflicting avoidance rules unless the document structure requires them.

Oversized Content

The break-inside property cannot guarantee that an element will remain together when it is too large for the available fragment.

Tall Content Group

.long-section {
  break-inside: avoid;
}

If the section is taller than a printed page, the browser may need to split it.

Large Images

@media print {
  .report-image {
    max-width: 100%;
    break-inside: avoid-page;
  }
}

The avoidance rule does not automatically resize an oversized image to fit the page.

Long Tables

@media print {
  .report-table tr {
    break-inside: avoid-page;
  }
}

Allow long tables to continue across pages while attempting to keep individual rows together.

Avoid Excessive Empty Space

Applying break-inside: avoid to many large elements may create substantial unused space when entire groups move to later fragments.

Choose Smaller Content Groups

Apply avoidance rules to figures, cards, short sections, and other groups that can reasonably fit within one page or column.

When content must span multiple fragments, allow automatic breaks and use other fragmentation properties to improve the result.

Three primary properties work together to control fragmentation.

Property Purpose
break-before Controls breaks immediately before an element.
break-after Controls breaks immediately after an element.
break-inside Controls breaks within an element.

break-before

.chapter {
  break-before: page;
}

Starts the chapter on a new printed page.

break-after

.chapter {
  break-after: page;
}

Starts the content following the chapter on a new printed page.

break-inside

.figure {
  break-inside: avoid-page;
}

Requests that the figure remain on a single printed page.

Combined Example

@media print {
  .chapter {
    break-before: page;
  }
  .chapter-heading {
    break-after: avoid-page;
  }
  figure {
    break-inside: avoid-page;
  }
}

These rules start chapters on new pages, discourage breaks after chapter headings, and attempt to keep figures together.

Legacy page-break-inside

The older page-break-inside property was used to control page breaks within elements.

Legacy Syntax

.card {
  page-break-inside: avoid;
}

Modern Equivalent

.card {
  break-inside: avoid-page;
}

Compatibility Example

@media print {
  .card {
    page-break-inside: avoid;
    break-inside: avoid-page;
  }
}

The legacy declaration can help with older printing implementations, while the modern declaration specifically targets page fragmentation.

Legacy Value Mapping

page-break-inside break-inside
auto auto
avoid avoid-page for page-specific behavior

Difference from General Avoidance

The modern break-inside: avoid value requests avoidance of applicable fragmentation types, while avoid-page specifically targets page breaks.

Use break-inside for new stylesheets and retain the legacy property only when compatibility requirements justify it.

Practical Uses

The break-inside property helps keep related content together in printed documents and multi-column layouts.

Printable Report Cards

@media print {
  .report-card {
    break-inside: avoid-page;
  }
}

Figures and Captions

@media print {
  figure {
    break-inside: avoid-page;
  }
}

Multi-Column Cards

.cards {
  column-count: 3;
}
.cards .card {
  break-inside: avoid-column;
}

Table Rows

@media print {
  tr {
    break-inside: avoid-page;
  }
}

Blockquotes

blockquote {
  break-inside: avoid;
}

Short Content Sections

@media print {
  .short-section {
    break-inside: avoid-page;
  }
}

Invoice Item Groups

@media print {
  .invoice-item {
    break-inside: avoid-page;
  }
}

Summary Boxes

@media print {
  .summary-box {
    break-inside: avoid-page;
  }
}

Apply avoidance rules to content groups that should remain readable as a unit, while allowing long sections to flow naturally across fragments.

break-inside Example

The following example demonstrates how break-inside: avoid helps keep cards together in a multi-column layout.

<div class="break-inside-demo">
  <div class="card">
    <h3>Card One</h3>
    <p>This card contains related information.</p>
    <p>Its content should remain together.</p>
  </div>
  <div class="card">
    <h3>Card Two</h3>
    <p>This card should not split between columns.</p>
  </div>
  <div class="card">
    <h3>Card Three</h3>
    <p>The browser places each card as a group.</p>
  </div>
</div>
.break-inside-demo {
  columns: 2;
  column-gap: 20px;
}
.break-inside-demo .card {
  display: flow-root;
  margin-bottom: 15px;
  padding: 12px;
  background-color: #e8f3fb;
  border: 1px solid #b6d6ec;
  break-inside: avoid;
}
.break-inside-demo h3 {
  margin: 0 0 8px;
  color: #1769aa;
}
.break-inside-demo p {
  margin: 0 0 8px;
}
.break-inside-demo p:last-child {
  margin-bottom: 0;
}
Browser Result

Card One

This card contains related information.

Its content should remain together.

Card Two

This card should not split between columns.

Card Three

The browser places each card as a group.

The break-inside: avoid declaration requests that each card remain intact rather than splitting between columns.

Depending on the available space, a card may move to the next column. If a card is too large to fit in a single fragment, the browser may still need to divide it.

Important Considerations

Keep the following points in mind when using break-inside:

  • Purpose: Controls fragmentation within an element.
  • Initial value: auto.
  • Inheritance: The property is not inherited.
  • Automatic breaks: auto allows normal fragmentation.
  • General avoidance: avoid discourages applicable break types within an element.
  • Page avoidance: avoid-page specifically discourages page breaks.
  • Column avoidance: avoid-column specifically discourages column breaks.
  • Region avoidance: avoid-region is not dependable in modern mainstream browsers.
  • No forced break values: The property does not accept page, column, or always.
  • Printed documents: Useful for keeping figures, cards, and short sections together.
  • Multi-column layouts: Useful for preventing cards from splitting between columns.
  • Large elements: Oversized content may still need to be divided.
  • Unused space: Moving whole elements to later fragments can leave empty space.
  • Break priority: Forced breaks can override avoidance requests.
  • Related properties: break-before and break-after control breaks at element boundaries.
  • Legacy compatibility: page-break-inside may still be useful for older print engines.
  • Normal screen layouts: The property does not prevent ordinary scrolling or create new columns.
  • Animation: Changes between values are discrete.
  • Testing: Verify the result in the target browsers and print engines.

Use break-inside on appropriately sized content groups to improve readability across pages and columns without unnecessarily restricting normal content flow.

Browser Support

The break-inside property has varying browser support depending on the selected value, element type, and fragmentation context.

Common page and column avoidance behavior is supported in modern browsers, but implementation differences remain, particularly for complex tables, grid and flex layouts, and region-related values.

@media print {
  .card {
    break-inside: avoid-page;
  }
}

This rule requests that each matching card remain on one printed page when possible.

Legacy Print Compatibility

@media print {
  .card {
    page-break-inside: avoid;
    break-inside: avoid-page;
  }
}

The legacy declaration may help with older browser printing implementations.

For current compatibility details, visit Can I Use? and check support for the specific break behavior you need.

Specifications

The break-inside property is defined in the CSS Fragmentation Module Level 3 specification.

CSS Fragmentation Module Level 3

The specification defines break avoidance within boxes and explains how break-inside interacts with forced breaks and other fragmentation rules.