This question was asked and answered, but the largely approved answer answered:
- doesn't explain how to do it
- does not work
The reason, of course, is that the accepted answer 1 is out of date 2 . And the W3C did not come up with any standard replacement. This leaves me with a problem, as I have actual things to do.
How do I tell the browser to print content in the landscape?
Example that doesn't work
I put together an example containing every piece of chewing gum that I could find.
<!DOCTYPE html> <HEAD> <STYLE type="text/css"> /* /questions/36272/landscape-printing-from-html/264162#264162 */ @page { size: landscape; } /* http://www.devx.com/tips/Tip/32962 */ @media print{ @page { size: landscape } } /* https://stackoverflow.com/a/16655216/12597 */ @media print{ .class-name{ @page{ size:landscape; } } } </STYLE> <STYLE type="text/css" media="print"> @page { size: landscape; } </STYLE> </HEAD> <BODY> Hello, landscape. </BODY> </HTML>
Can someone come up with something that works?
Suppose Chrome, IE11, or Edge.
Background
The reason I do this is because I need to print the landscape. In my particular case, I will use the advanced layout and layout services available in HTML for printing on 8.5 x 11 inches three-line paper:

I want to go down the stripes vertically, except that you need to have text, images and layout, to be horizontal on the page:

Reading bonuses
html printing landscape
Ian boyd
source share