Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Is there an issue with the page-break-after CSS property? Every subsequent page gets more and more narrow. Other browsers do not do this.

  • 4 respostas
  • 1 has this problem
  • 1 view
  • Last reply by user1929

more options

My company uses a web based software application to manage some data. We have a report that uses the page-break-after CSS property and it appears to be breaking how the report prints. Each page gets more and more narrow for how much space the data is fit into. The right margin is getting larger and larger until the data is only on one half the page. It does not matter if I change the scale of the page to 'Shrink to Fit' or pick a certain percent. This issue does not happen on other printouts where the page-break-after isn't used. This issue also does not occur in any other browsers. We have designed this report to ensure it prints on one page but since Firefox is making it more and more narrow, it is extending on to two pages after a certain page count.

My company uses a web based software application to manage some data. We have a report that uses the page-break-after CSS property and it appears to be breaking how the report prints. Each page gets more and more narrow for how much space the data is fit into. The right margin is getting larger and larger until the data is only on one half the page. It does not matter if I change the scale of the page to 'Shrink to Fit' or pick a certain percent. This issue does not happen on other printouts where the page-break-after isn't used. This issue also does not occur in any other browsers. We have designed this report to ensure it prints on one page but since Firefox is making it more and more narrow, it is extending on to two pages after a certain page count.

All Replies (4)

more options

Could you share the exact HTML that's causing this problem? I've tried creating a bunch of paragraphs with page-break-after: always between them, and I'm not able to reproduce this issue.

more options

Here is the code I'm using for the page-break-after.

This is the only report that uses this property, all other reports that don't still work as expected which is why I think this is what's breaking it. I would also like to note that the report I'm running is over 20 pages long and it takes till around the 10th page to really see the difference.

more options
      • p style="page-break-after:always;"/p***

I'm using the '<' characters where necessary, but can't post in the reply...

apape modificouno o

more options

OK, I'm testing with this HTML: https://pastebin.mozilla.org/9074498 using the "Microsoft Print to PDF" printer option, and I'm not seeing any change in the margins. Does the issue still happen if you use the linked HTML? Do you get different results depending on whether you save a PDF to your computer or print to an actual printer?

Also, could you try resetting Firefox? (This will remove any addons you have installed, but will keep your other data).

  1. Open the Troubleshooting Information page using one of these methods:
    • Click the menu button New Fx Menu, click help Help-29 and select Troubleshooting Information. A new tab containing your troubleshooting information should open.
    • If you're unable to access the Help menu, type about:support in your address bar to bring up the Troubleshooting Information page.
  2. At the top right corner of the page, you should see a button that says "Refresh Firefox" ("Reset Firefox" in older Firefox versions). Click on it.
  3. Firefox will close. After the refresh process is completed, Firefox will show a window with the information that is imported.
  4. Click Finish and Firefox will reopen.