page-break-before

Esta propriedade foi substituída pela propriedade break-before.

A propriedade CSS page-break-before ajusta as "quebras de páginas" antes do elemento atual.

Esta propriedade aplica-se para elementos em bloco (block) que geram uma caixa. Não será aplicada em uma <div> vazia que não irá gerar uma caixa (box).

/* Keyword values */
page-break-before: auto;
page-break-before: always;
page-break-before: avoid;
page-break-before: left;
page-break-before: right;
page-break-before: recto;
page-break-before: verso;

/* Global values */
page-break-before: inherit;
page-break-before: initial;
page-break-before: unset;
Initial valueauto
Aplica-se ablock-level elements in the normal flow of the root element. User agents may also apply it to other elements like table-row elements.
Inheritednão
Midiaas each of the properties of the shorthand:
  • visual: Value not found in DB!
  • paged: Value not found in DB!
Computed valueas specified
Animation typediscrete
Canonical orderthe unique non-ambiguous order defined by the formal grammar

Page break aliases

A propriedade page-break-before agora é uma propriedade legada, substituída por break-before.

Por motivos de compatibilidade, page-break-before é tratada pelos navegadores como um alias de break-before. Isso garante que sites usando page-break-before continuem a funcionar. Um subconjunto de valores deve manter aliases como a seguir:

page-break-before break-before
auto auto
left left
right right
avoid avoid
always page

Syntax

Values

auto
Initial value. Automatic page breaks (neither forced nor forbidden).
always
Always force page breaks before the element.
avoid
Avoid page breaks before the element.
left
Force page breaks before the element so that the next page is formatted as a left page.
right
Force page breaks before the element so that the next page is formatted as a right page.
recto
If pages progress left-to-right, then this acts like right. If pages progress right-to-left, then this acts like left.
verso
If pages progress left-to-right, then this acts like left. If pages progress right-to-left, then this acts like right.

Formal syntax

auto | always | avoid | left | right | recto | verso

Examples

/* avoid page break before the div */
div.note { 
    page-break-before: avoid;
} 

Specification

Specification Status Comment
CSS Logical Properties and Values Level 1
The definition of 'recto and verso' in that specification.
Rascunho editorial Adds the values recto and verso.
CSS Paged Media Module Level 3
The definition of 'page-break-before' in that specification.
Rascunho atual Extends the element that this property applies to table rows and table row groups.
CSS Level 2 (Revision 1)
The definition of 'page-break-before' in that specification.
Recomendação Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
page-break-beforeChrome Full support 1Edge Full support 12Firefox Full support 1
Notes
Full support 1
Notes
Notes The values avoid, left, and right are unsupported.
IE Full support 4Opera Full support 7Safari Full support 1.2WebView Android Full support 37Chrome Android Full support 18Firefox Android Full support 4
Notes
Full support 4
Notes
Notes The values avoid, left, and right are unsupported.
Opera Android ? Safari iOS Full support 1Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

See also