Browse documentation

Reference / Layout

Break inside

Keep tightly related content, such as a figure and caption, together when columns or pages divide the document.

Working example

A browser can move the whole figure to the next column if it fits there. Oversized content may still need to break.

HTML
<div class="columns-2 gap-4">
  <p>Ink samples from the archive.</p>
  <figure class="break-inside-avoid-column border p-2">
    <div class="h-8 bg-black"></div>
    <figcaption class="text-sm">Carbon black</figcaption>
  </figure>
</div>

Class reference

ClassCSS declarations
break-inside-autobreak-inside: auto;
break-inside-avoidbreak-inside: avoid;
break-inside-avoid-columnbreak-inside: avoid-column;
break-inside-avoid-pagebreak-inside: avoid-page;
View full generated CSS
Compiled CSS
.break-inside-auto {
  break-inside: auto;
}
.break-inside-avoid {
  break-inside: avoid;
}
.break-inside-avoid-column {
  break-inside: avoid-column;
}
.break-inside-avoid-page {
  break-inside: avoid-page;
}