Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: HTML
Hello, how can I make a html table print in landscape mode?
I used this in css file but it doesn't work,
//css file
.page
{
    size: landscape;
}
//php file
<div class="page">
<table>...</table>
</div>
Posted 10-Oct-12 23:05pm
Edited 10-Oct-12 23:35pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

hi
 
check it out once link 1[^]
link2[^]
or
 
<style type="text/css" media="print">
.landscape {
width: 100%;
height: 100%;
margin: 0% 0% 0% 0%; filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=1);
}
</style>
  Permalink  
Comments
Eman Ayad at 11-Oct-12 7:04am
   
Thank you, but that rotate the table and put it in the center,
and the header and footer of the page still portrait
knvsatyanarayana at 11-Oct-12 7:14am
   
once try this by changing the values Rotation=1 to 3
Eman Ayad at 14-Oct-12 7:18am
   
Thanks, but also doesn't solve.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
Eman Ayad at 11-Oct-12 7:13am
   
Thank you, but the same thing for solution1.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.140926.1 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100