|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
CSS print
Hi,
All the content of my web page is in a table which is 760 pixels width. This is fine on the screen, but when printing, the right part is cut. I tried to set a new css print stylesheet <link rel="stylesheet" type="text/css" href="print.css" media="print"> to avoid this problem, but it is not working. I tried to change the margin and padding, but there is no change. I still have the same problem. I tried many different configurations, but none of them worked... I did probably something wrong. I know that the page is properly printed if I change manually the print setting (file -> page setting) margin to 5mm, but how can I do it with the css, in order than everybody who would like to print the page has the complete page printed? Could someone help me? Many thanks |
|
#2
|
|||
|
|||
|
RE: CSS print
on your print stylesheet, just change the width attribute to 100%. That will it will take up the entire width of the sheet, with out going over...
|
|
#3
|
|||
|
|||
|
RE: CSS print
I define a <div id="page"> </div> in my html, which includes all the content of my page.
Then, in my print.css I put this: #page { width:100%; background:#FFFFFF; border-top: 0; margin: 0; padding: 0; } But it is not working... |
|
#4
|
|||
|
|||
|
RE: CSS print
I don't know... I would take out the margin and padding stuff and just leave the 100%... Try that, oh, and are you trying to print an image (or images) that are too wide? that might be what's causing your problem...
|
|
#5
|
|||
|
|||
|
RE: CSS print
I left just the 100%, but it is still the same.
It is not a problem of image, because if I change manually the margin in the page settings, and reduce it at 5mm, then it is printed correclty. |
|
#6
|
|||
|
|||
|
RE: CSS print
huh... you got me stumped, sorry I couldn't be of more help...
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > CSS print |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|