Click here to Skip to main content
12,360,037 members (62,451 online)
Rate this:
 
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
Updated 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 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 11-Oct-12 7:14am
   
once try this by changing the values Rotation=1 to 3
Eman Ayad 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2016
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