html - While printing a div using window.print(), the margins in @page{ } are not getting applied -


html:

<input type="button" onclick="printdiv('invoice')" value="print div!"/> <div id="invoice"> <!-- content--> </div> 

css:

<head><style type="text/css" media="print">  @page{     margin-right : 0;     margin-left : 0;     margin-top : 1in;     margin-bottom :1in; }  </style> </head> 

when click on button print preview opens margin not applied.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

python - Error: Unresolved reference 'selenium' What is the reason? -

asp.net ajax - Jquery scroll to element just goes to top of page -