Computer >> Computer tutorials >  >> Programming >> CSS

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>