Join the Mozilla’s Test Days event from Dec 2–8 to test the new Firefox address bar on Firefox Beta 134 and get a chance to win Mozilla swag vouchers! 🎁

Fungovanie tejto stránky je z dôvodu údržby dočasne obmedzené. Ak článok nevyrieši váš problém a chcete položiť otázku, napíšte našej komunite podpory na Twitter @FirefoxSupport alebo Reddit /r/firefox.

Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Ďalšie informácie

page-break-before is not working... suggestions?

more options

page-break-before is not working. It does work on chrome. I need to force a page break. how can I do this?


 
page-break-before is not working. It does work on chrome. I need to force a page break. how can I do this? <div style="page-break-before: always;">&nbsp;</div>

Všetky odpovede (6)

more options

Superseded by break-before : Please see :

Please let us know if this solved your issue or if need further assistance.

more options

OK, In chrome, or if I create a pdf, it works. When I print from Firefox, on any printer, it does not always work. If I have 2 page breaks close, the 2nd one does not work in Firefox.


I appreciate your help.

more options
more options

Attached is the skeleton of the HTML.

When I put just this code in a page, not one page break works. When however, I replace "(2)more content here" which is more content (> 1/2 page), then the first break works.... because it is more content???

If all 3 sections have content > 1/2 page, all the page breaks work. Again this issue exists only in Firefox.

Am I missing something?

Upravil(a) Ed Arthur dňa

more options

W3C.org (World Wide Web Consortium) in charge of standards and practices and future development of web page code and web browsers. Pages rank higher in Google when code is correct. Use your Google Webmaster Account to submit and track.

HTML ERRORS - https://validator.w3.org/nu/?doc=http%3A%2F%2Fww38.yourschool.com%2F

CSS ERRORS - https://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.yourschool.com%2F&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en

Please let us know if this solved your issue or if need further assistance.

more options

Thanks for the screenshot.

I'm pretty sure the problem is on the first line. You're partially triggering Firefox's table layout rules, which do not paginate the same way as its block element layout rules.

Compare: https://www.jeffersonscher.com/res/page-break-before.html

Why do you use display:table for the outer div? Or to put that another way, can you get whatever effect you're looking for in some other way?