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

python - PyInstaller UAC not working in onefile mode -

python - RuntimeError: can't re-enter readline -

php - Need to store a large amount of data in session with CI 3 but on storing large data in session it is itself destorying automatically -