Set printing double-sided documents with CSS


When printing double-sided documents, the page boxes on the left and right pages should be different.

Example

It can be expressed through two CSS pseudo-classes as follows −

<style>
   <!--
      @page :left {
         margin-left: 4cm;
         margin-right: 3cm;
      }
      @page :right {
         margin-left: 3cm;
         margin-right: 4cm;
      }
   -->
</style>

Updated on: 26-Jun-2020

344 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements