I have used the css to print the page orientation to landscape. But it is not giving the desired result. the code I have used,

<style type="text/css" media="print">
.land{filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}
</style>

Please suggest me to print to lanscape. I am using php and javascript.

Regards,
maza

Hi avmaza,

It appears you've stumbled onto Microsoft's proprietary filters. This is fine for Internet Explorer browsers, but anything else is going to choke on this CSS rule and spit out the results in the normal orientation.

Here is an interesting way to do it... Works at least in IE 6.0, not in Firefox:

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

This is another discussion about trying to get as many browsers to work as possible (hint: you may consider using the aforementioned link's information instead of this link's ActiveX approach for IE):

http://edacio.us/forum/comments.php?DiscussionID=39

Hope you can get something out of these links... If not, try:

http://www.google.com/search?hl=en&q=landscape%2Bcss&btnG=Search

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.