css  page-break-before property

the css page-break-before property sets the page break before an element.

note:- you cannot use this property on absolutely positioned elements.

the page-break-before property syntax :-

		page-break-before:   <value>  ;
page-break-after
default valueauto
inheritedno
mediavisual, paged
version:css2

browser support - css page break before

the page-break-before property is supported in all major browsers.

note:- the firefox, chrome, safari do not support the property values "avoid", "left", "right".


css page-break-before property example

       <style  type="text/css">
            
     @media print{
            		table  {page-break-before:always;}
            		
            }
                </style>

css  page-break-after property

the css page-break-after property sets the page break after an element.

note:- you cannot use this property on absolutely positioned elements.

the page break before syntax :-

			page-break-after:   <value>  ;
page-break-after
default valueauto
inheritedno
mediavisual, paged
version:css2

browser support -css page-break-after

the css page-break-after property is supported in all major browsers(chrome,mozilla,opera, safari, ie).

note:- the firefox, chrome, safari do not support the property values "avoid", "left", "right".


css page-break-after property example

<style  type="text/css">
            
      @media print{
      
      		      table  {page-break-after:always;}
      		      
            }
                 </style>

css page-break-before and page-break-after property values

valuedescription
alwaysalways insert a page break after the object.
autodefault neighter force nor forbid a page break after the object.
avoidinternet explorer 8.forbid a page break after the object,if possible.
leftcurrently behaves the same as always.
rightcurrently behaves the same as always.
inheritinherit from the parent element.

css page-break-inside property

the css css page-break-inside property sets the page breaking behavior inside an element.

note:- you cannot use this property on absolutely positioned elements.

the page-break-inside property syntax :-

			page-break-inside: <value>  ;
page-break-inside
default valueauto
inheritedno
mediavisual, paged
version:css2

browser support - css page break inside

the page-break-inside property is only supported by opera.


css page break inside example

<style  type="text/css">
 @media print{
                 table  {page-break-inside:avoid;}
            
        
                </style>

css page-break-inside property values

valuedescription
autodefault.insert a page break inside the element.
avoidavoidinserting a page break inside the element.
inheritinherit from the parent element.

css  @page  property.

the css @page property is used in paged media to specify the page type for printed elements.

 the syntax:-

			@page:    <integer>|   inherit>>;
page
initial valueauto
applies toblock level elements.
inheritedyes
mediavisual, paged
version:css2

browser support - css page break property

the css @page property is supported in all major browsers.

note:-ie8 supports the page property only if a !doctype is specified.

css @page property example

<style   class="text/css">
         
  @page wide{
         
         						size:landscape;}
         
   img{
            page:wide;
            
            page-break-before:right;   
         }
               </style>