Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, how can I make a html table print in landscape mode?
I used this in css file but it doesn't work,
CSS
//css file
.page
{
    size: landscape;
}

PHP
//php file
<div class="page">
<table>...</table>
</div>
Posted
Updated 10-Oct-12 23:35pm
v2

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>
 
Share this answer
 
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
Naga KOTA 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.
 
Share this answer
 
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900