[Vuejs]-How do I control overflowing content in html page printing?

0👍

You can use CSS styling and apply it only to print.
Here is an example:

@media print {
#header {
margin-top: 100px;
}}

That CSS renders the #header to have a margin top of 100px but only on print.

If you want to remove the header on print use this:

@media print {
#header {
display: none;
}}

0👍

After reading your comments now I understand you want to force an element onto the next page only for print. Since we don’t know what class your element has because you didn’t provide any links. We will give you general code which you will have to modify.

This is the CSS you would use if you wanted an element to be on the next page:

@media print {
.ThisIsYourElement {
page-break-after: always;
}}

Here is the documentation for that.

Leave a comment