How to use styles to fix the display of the document in the print preview in Mozilla? The document does not fit on the page.

Tried to fasten something like this, but does not help:

@-moz-document url-prefix() { @media print { .page { text-align: left; width: 700px; height: 900px; } } 

Here is a preview of how it looks now.

What does the same document look like in Chrome

  • Customize margins as always when printing. and footers. - Drakonoved

1 answer 1

We remove extra margins when printing:

 @media print { @page { padding: 0; margin: 0; } } 
  • This is probably not the case for paddings. I removed them, as you suggested, but the problem remained: prntscr.com/gthhly The problem is that it does not fit on the page, and I try to change it in height, but it does not react at all. Added to the description of the screen, it looks like in chrome - MrStacky
  • Well here it is necessary to look at the code. You can’t say what else can be cut off. Line spacing, font size, padding in cells. All this needs to @page written here either in @page , or in @media print add a rule for the desired class. - Drakonoved