Forum Moderators: not2easy

Message Too Old, No Replies

print stylesheet tables problem

can I get it to ignore the table and just print the div?

         

HelenDev

2:53 pm on Jan 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've got a website laid out with tables. I want the print stylesheet to only print out the main content div, and ignore the tabular layout. Is it possible? If so how do I do it?

Arno_Adams

3:29 pm on Jan 19, 2005 (gmt 0)

10+ Year Member



Create a special stylesheet for 'print' and add
'display: none' in that stylesheet to all the elements you don't want to print.

HTH, AA

createErrorMsg

3:34 pm on Jan 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



add 'display: none' in that stylesheet to all the elements you don't want to print.

Just setting the other elements to display:none will leave the table formatting intact.

You would have to use display:none on the cells themselves, leaving only the cell containing the content div, which ought to then fill the table. You'll also need to style away any background or borders on the table, itself.

cEM

HelenDev

4:46 pm on Jan 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks cEM, that was just what was needed.

I tagged all my tds with a noprint class except for the one I wanted to print.