Click to See Complete Forum and Search --> : problem when using @page
SKTodd
10-30-2006, 10:16 AM
I am having a problem getting a print function to force the printer page to print in landscape mode. I am using the following style:
<STYLE type="text/css" media="print">
@page { size: landscape; margin: 0in }
.heading {display: none }
</style>
Have any ideas why it still prints in portrait mode?
Jeff Mott
10-30-2006, 12:35 PM
The ‘size’ property is part of the CSS 3 specification, which is still under development. You should not expect to see it supported for a while yet.
SKTodd
10-30-2006, 12:46 PM
According to the W3 it is part of the CSS2 specification. http://www.w3.org/TR/CSS2/cover.html#minitoc
Do you know of another way to force a page to print in landscape format?
Thanks for the help!
Jeff Mott
10-30-2006, 12:58 PM
Hmm. Oddly, when the W3C revised the CSS 2 specification (CSS 2.1 (http://www.w3.org/TR/CSS21/)) the ‘size’ property was removed. It is being reintroduced in CSS 3, however.
In any case, no, I do not know of any other method to control the orientation of the page.
esaiwebteam
10-30-2006, 01:54 PM
I am having a problem getting a print function to force the printer page to print in landscape mode. I am using the following style:
<STYLE type="text/css" media="print">
@page { size: landscape; margin: 0in }
.heading {display: none }
</style>
Have any ideas why it still prints in portrait mode?
SKTodd,
another method might be using ActiveX.. it needs server side scripting, but it works.
i've done it before.. if u need a sample, i can post it to u later on.
SKTodd
10-30-2006, 02:00 PM
A sample would be great. Thanks!
toicontien
10-30-2006, 04:56 PM
Which of course will only work for people using Internet Explorer. Then again, I think if most people see the page didn't print well portrait, then they might reprint it landscape. That's why a JavaScript-induced print preview (http://www.alistapart.com/articles/printtopreview) is handy.
The site I've been working on uses a similar method to the ALA article in the Events section: http://www.motortopia.com/events/view/e/526/i/twilight_cruise_night