aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes removing columns from a multicolumn page for printing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "removing columns from a multicolumn page for printing" Watch "removing columns from a multicolumn page for printing" New topic
Author

removing columns from a multicolumn page for printing

Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I have several cites which use essentially the same CSS layout: a fixed width column of ads-n-stuff to the left, and the main content taking up the rest of the page width, and as much vertical space as it needs. This is a fine layout for on-line viewing, but it sucks when printed.
I vaguely remember reading that you can apply different CSS styles when printing a page, but can anyone give any concrete example of you to use this technique to print just the main body content without the ads?
If it helps, you can see an example site using this layout at http://www.servletshop.com/ or just grab the CSS I use at the moment from http://www.servletshop.com/servletshop.css
All suggestions welcome, thanks!


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
use media with CSS to hide it.....
@media print{
#adSection{display:none;}
}
See if this helps

Eric
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
That worked great. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: removing columns from a multicolumn page for printing