Click here to Skip to main content
11,706,803 members (45,197 online)
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
0 Sergey Alexandrovich Kryukov 140
1 OriginalGriff 125
2 chainerlt 110
3 ppolymorphe 109
4 Mika Wendelius 70
0 OriginalGriff 9,178
1 Sergey Alexandrovich Kryukov 8,487
2 CPallini 5,189
3 Maciej Los 4,766
4 Mika Wendelius 3,696


Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2015
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