CSS @page rule

CSSWeb DevelopmentFront End Technology

You can specify the dimensions, orientation, margins, etc., of a page box within an @page rule. The dimensions of the page box are set with the 'size' property. The dimensions of the page area are the dimensions of the page box minus the margin area.

For example, the following @page rule sets the page box size to 8.5 × 11 inches and creates '2cm' margin on all sides between the page box edge and the page area:

<style>
   <!--
      @page { size:8.5in 11in; margin: 2cm }
   -->
</style>
raja
Published on 30-Apr-2018 09:16:29
Advertisements