Solved

How do i print in landscape

Posted on 2004-09-13
2
212 Views
Last Modified: 2011-10-03
How can i print web pages in landscape using css?
0
Comment
Question by:Peter1985
2 Comments
 
LVL 12

Accepted Solution

by:
ill earned 50 total points
ID: 12042965
you can't change it in css. client has to set it in browser. there is some acticveX? component, that allows printing landscape for IE only, but i can't find link now
0
 
LVL 19

Expert Comment

by:peh803
ID: 12043945
This is a snippet from the following location:

http://home.tampabay.rr.com/bmerkey/examples/landscape-test.html

--------------------------------
This handy trick works in IE5.5/Win and newer. It assumes that the default printer orientation is portrait. Look at this page with your browser Print Preview to see the code in action.

Use the writing-mode property (submitted to W3C). A value meant for East Asian typography, tb-rl, causes IE to write text from top to bottom and right to left. Surround the content you want in landscape with a DIV with a class defined in a print stylesheet. For instance:

<style type="text/css" media="print">
div.page      {
writing-mode: tb-rl;
height: 80%;
margin: 10% 0%;
}
</style>
--------------------------------

Hope this helps,
peh803
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question