Reputation: 323
With Adobe Indesign it's possible to get this result:
I tried to get the same result with css
<style type="text/css" media="print">
@page
{
size: auto; /* auto is the initial value */
margin: 0mm; /* this affects the margin in the printer settings */
}
body
{
background-color:#FFFFFF;
border: solid 1px black ;
margin: 0px; /* this affects the margin on the content before sending to printer */
}
</style>
but it's impossible to set the margins to 0. I always have a margin on the 4 sides:
I'm using google chrome to do my tests. I also tried:
same thing, some little white margins on the 4 sides...what's wrong?
Any help would be appreciate. JsFiddle : https://jsfiddle.net/L63dc1yd/
Upvotes: 2
Views: 5538
Reputation: 323
I found the issue. I haven't seen the option 'US Letter bordeless' in the page size selection list. The css was OK, it override the chrome default margin setting.
Upvotes: 1
Reputation: 1360
I think you can solve this problem with CSS3 Media Query.
@media print {
html,body {
margin: 0;
}
}
Upvotes: 2