Menu

CSS TUTORIALS - CSS - Paged Media

CSS - Paged Media

ADVERTISEMENTS


<style tyle="text/css">
<!--
@page { size:8.5in 11in; margin: 2cm }
-->
</style>

ADVERTISEMENTS

Setting Page Size:


<style tyle="text/css">
<!--
@page {
  size: auto;   /* auto is the initial value */
  margin: 10%;
}
-->
</style>

ADVERTISEMENTS


<style tyle="text/css">
<!--
@page {
  size: 8.5in 11in;  /* width height */
}
-->
</style>


<style tyle="text/css">
<!--
@page { size : portrait }
@page rotated { size : landscape }
table { page : rotated }
-->
</style>


<style tyle="text/css">
<!--
@page :left {
  margin-left: 4cm;
  margin-right: 3cm;
}

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


<style tyle="text/css">
<!--
@page { margin: 2cm } /* All margins set to 2cm */

@page :first {
  margin-top: 10cm    /* Top margin on first page 10cm */
}
-->
</style>


<style tyle="text/css">
<!--
h1 { page-break-before : right }
h2 { page-break-after : avoid }
-->
</style>


<style tyle="text/css">
<!--
table { page-break-inside : avoid }
-->
</style>


<style tyle="text/css">
<!--
@page{orphans:4; widows:2;}
-->
</style>