I have a long article, I want to design it for a real good feeling when the user wants to print.
this is my first style:
@media print {
h2 {
page-break-before: always;
}
pre, blockquote,table, figure {
page-break-inside: avoid;
}
h1, h2, h3, h4, h5 {
page-break-after: avoid;
page-break-inside:avoid;
}
h1+p, h2+p, h3+p {
page-break-before: avoid;
}
}
So now I want to set the content of the page in the middle of the page so that when the content of the page does not fill the page, this content will be in the middle of the page.
this is the wrong position
this is the correct position
any CSS or JS answer may be working. but I have no idea.