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 -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -