Reputation: 11070
I have to print an HTML page. As I use a continous sheet, I need to set the print margin to the last line in the page so that paper is not wasted. Is there any HTML tag/css property to set the printer margin?
Upvotes: 0
Views: 358
Reputation: 15860
Yes, you can set the printer options using CSS Media Queries
@media print {
/* all the properties here would be applied to printed form only */
}
This way you can change the display of the HTML elements on the screen and the printed form.
To minimize the page usage you can shorten the font-size, you can minimize the margins, you can reduce the paddings etc. Like this:
@media print {
font-size: .8em;
padding: 1px; /* or none if there is 1px padding */
margin: 0; /* or just the margin-bottom to be set as 0 */
}
The rest is upto you. You can change all the properties so that they fit in the page size.
Upvotes: 1