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

4x4 Matrix in Python -

wso2is - WSO2 IS 5.0.0 SP1 After restart there is authentication error -

python - String indices must be integers and while issue -