CSS
π― CSS break-before Property
The break-before CSS property controls whether a page, column, or line break should occur before an element, especially in multi-column layouts.
It defines whether an element starts in a new column or continues in the current flow of content.
πΉ Where Is break-before Used?
-
Common Use Cases
- π Newspaper and magazine-style layouts
- π Multi-column blog articles
- π Card-based grid systems
- π Structured long-form content
πΉ break-before Values
- auto β Browser decides where to break
- column β Forces a new column before the element
- initial β Resets to default (auto)
π§© Basic Example
CSS
.columns {
column-count: 3;
}
h2 {
break-before: column;
}
In this example, the content is split into 3 columns, and every H2 heading starts in a new column.
-
π§ Summary
- break-before controls whether an element starts on a new column or page.
- It is mainly used in multi-column layouts and print-style designs.
- column forces a new column break before the element.
- auto lets the browser decide automatically.
