CSS Trick: Avoid being Cutover between Pages when Printing

If you have a web page that cuts the images in half when printed, all you need to do is add the following codes in your CSS style sheet.

@media print {
div {
page-break-inside: avoid;
}
}

Magic.

Leave a Reply

Your email address will not be published.