1 reply [Last post]
Ally
Offline
newbie
Last seen: 16 years 13 weeks ago
Joined: 2004-07-29
Posts: 1
Points: 0

Let me start by saying i am VERY new to CSS in any form, though i'm quite excited by what i've seen it can do. Hoever i'm having a problem with printing.

I have a webpage currently which is basically a big table generated server side. I wanted to see what i could do with this page so i simply added

<style>
@media print {
table { size: landscape; color: red}
}
</style>

Now this DOES change the table text to red, so it DOES work, but for the life of me i cannot get it to print landscape by default. Am i doing something stupid here ? I've had a brief look around the web but theres not much help there, and any decent looking help i HAVE found has been several years old and often claims this feature is not supported in major browsers.

Oh and i should add i'm only trying to make this work on IE6

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 42 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Printing Issue

Hi Ally,

As far as I'm aware you can't change the page orientation for printing through CSS, size: landscape; is not a valid CSS property, landscape/ portrait is selected when you choose print on the browser menu. if you wanted a different page layout I think you will need to set it out in the print style sheet.

Hope that's of help,

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me