Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS No Printing problem. 1

Status
Not open for further replies.

Borvik

Programmer
Joined
Jan 2, 2002
Messages
1,392
Location
US
Hello All!

I know how to not print a certain section of my webpage using CSS, however, my problem lies in the fact when I reduce my page to only the part I want printed - it prints on two pages with the second page blank. Anyone have any ideas on how/why that would happen. Here is the site:
 

I suspect that it may be the height="100%" on your table... As for printouts, this would theoretically be 100% of the page height (I think?), which, given the header and footer, would push your content onto two pages.

If I change it to 90%, it works just fine... so you might want to work out another way of styling your page without using percentages in tables. How about using CSS instead - that way you can have one for screen, and one for print.

Hope this helps,
Dan

 
hmm...

interesting - i'll try that.

It's weird though, without the "noprint" style on there, it would print on a single page - even with the 100% height. Oh well - i'll try the css styling on the height too.

Thanks
 
Well, I can't say it was the height. When I reduced the height - it did reduce it to one page, but that page was blank.

It did get me think on the right track though. I applied my noprint class to all the <td>'s as well - but removed it from the <tr>'s after the portion I wanted it to print.

That got my text to print all on one page - then I noticed on pages with more text it would print a scrollbar with it! Oops - that was the span tag with the style overflow - set that up in the css for multiple media and it works now.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top