I need to hide header and footer section in printing page . I have used below css code to hide the header and footer .
@page {
size: auto;
margin: 0;
}
Its only working in chrome & Firefox. But not working in safari. How can I fix this ? Please help me to find solution.
I need to hide header and footer section in printing page . I have used below css code to hide the header and footer .
@page {
size: auto;
margin: 0;
}
Its only working in chrome & Firefox. But not working in safari. How can I fix this ? Please help me to find solution.
Share Improve this question asked May 17, 2017 at 5:10 user7726968user7726968 611 gold badge1 silver badge7 bronze badges 01 Answer
Reset to default 3According to caniuse., @page
is not supported by Safari. Actually, size
property is not supported well in IE/Edge and Firefox, so it is better not to use it.
To hide header and footer in print page. Maybe you can use media query:
@media print {
header,footer {
display: none;
}
}