Solved

How do i print in landscape

Posted on 2004-09-13
2
210 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now