O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

break-before

Values:

auto | always | avoid | left | right | page | column | avoid-page | avoid-column

Initial value:

auto

Applies to:

Block-level elements

Inherited:

No

Computed value:

Same as declared value

Description:

Defines whether a column or page break should or should not be placed before the element. Although it is theoretically possible to force breaks with always, it is not possible to guarantee prevention; the best an author can do is ask the user agent to avoid inserting a column or page break before the element. The keywords avoid-column and avoid-page attempt to prevent insertion before the element of column or page breaks, respectively. The keyword left is used to insert enough breaks before the element to make the page be a left-hand page; similarly, right is used for a right-hand page. page and always insert a page break before the element; column and always, a column break.

Examples:

h2 {break-before: always;}
h3 {break-before: avoid;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required