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)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Shai Vashdi 1,518
1 Manas Bhardwaj 319
2 Tadit Dash 285
3 OriginalGriff 273
4 Peter Leow 205
0 Sergey Alexandrovich Kryukov 9,530
1 OriginalGriff 5,716
2 Peter Leow 4,345
3 Maciej Los 3,540
4 Abhinav S 3,373


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