I hit print by accident earlier and realised my page looked awful printed vertically when it came out of the printer. Is there a property I can set in the code to make it print horizontally by default?
Asked
Active
Viewed 166 times
0
-
Do you mean in landscape mode (as opposed to portrait)? – Tom Nov 23 '09 at 09:58
-
In which code, the HTML on the page? – Carl Smotricz Nov 23 '09 at 09:58
-
possible duplicate of [Can I change page layout when using window.print()?](http://stackoverflow.com/questions/239232/can-i-change-page-layout-when-using-window-print) – Lorenz Meyer May 05 '14 at 11:49
2 Answers
3
Use landscape
for the page size and media="print"
:
<style type="text/css" >
@page
{
size: landscape;
margin: 2cm;
}
</style>
Doesn't work with IE6 but should work with IE7 and better or any other browser.
See this article.

Aaron Digulla
- 321,842
- 108
- 597
- 820
1
In the CSS you can do:
@page {
size: landscape
}
But I'm not sure about browser support.
You could always make the design more fluid ;-)

Tom
- 20,852
- 4
- 42
- 54