HTML CSS SQL Meta tag Generator ScrollBar design Generator Encode Decode images

CSS Basics

Introduction Syntax Selectors Attribute Selectors Specificity Combinators !important Comments Colors

CSS Need to Know

Box Model Pseudo-class Pseudo-element Inline-block Math Functions Max and Min Opacity Outline Overflow Z-index Float

Most used

Align Backgrounds Borders Text Units Padding Margins Position Tables Display Fonts Lists Height and Width

CSS Reference

CSS Properties reference CSS Pseudo-Classes reference CSS Pseudo-Elements reference CSS Selector reference

CSS break-inside

The break-inside property in CSS allows you to control where a page, column, or region breaks. This property is particularly useful when working with multi-column layouts or for controlling how content is displayed in print media.

Syntax:


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

The possible values for the break-inside property are:

Examples:

Result:

This is an example of text with the break-inside: avoid; property applied to a multi-column layout. The text will not break inside a column if possible.

In the example above, the text will stay within the same column rather than breaking and moving to the next column if possible.

Result:
Cell 1 Cell 2

In this example, the table cells have the break-inside: avoid; property applied, preventing them from breaking across multiple pages or columns.

.periodic {
   display: table;
}