How can add a border to pages when printing?

Apply CSS styling when printing the page

Write your CSS code under “@media print” media query. Whatever you are writing inside @media print, it will work in print mode only.


@media print{
    border: solid 2px #ddd;

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *