How to remove the URL from the printing page with CSS?

Spread the love

Sometimes, we want to remove the URL from the printing page with CSS

In this article, we’ll look at how to remove the URL from the printing page with CSS.

How to remove the URL from the printing page with CSS?

To remove the URL from the printing page with CSS, to set the margin to 0.

For instance, we write

<style type="text/css" media="print">
  @page {
    size: auto;
    margin: 0;
  }
</style>

to add the @page rule that sets the margin to 0 to hide the URL which is in the margin.

Conclusion

To remove the URL from the printing page with CSS, to set the margin to 0.

Leave a Reply

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