Solved

How do i print in landscape

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Button Css BootStrap 2 45
stop navigation from wrapping 7 77
would like the bottom of this page to be smaller 3 27
Increase the size of the modal in Bootstrap 5 22
When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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 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…

813 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