Forum Moderators: not2easy

Message Too Old, No Replies

Images still display on printout

I can print it out with a different stylesheet, but I need just a bit more.

         

Llama

2:48 pm on Apr 5, 2004 (gmt 0)

10+ Year Member



I've been using display: none; on my images, and a few divs, but when I test-print it, it still shows my images, and all of the content contained in the divs.

How can I "get rid of" these?

Thanks.

Alternative Future

4:14 pm on Apr 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you using a separate .css for the print? Then within this stylesheet you have the divs you dont want to show.

-George

TheDoctor

10:44 pm on Apr 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This should work. Post a bit of your code (HTML and CSS) to show what you have and what isn't working.

Are you sure you're not overriding the display:none by accident (eg more specific CSS rules)?

Llama

2:44 pm on Apr 6, 2004 (gmt 0)

10+ Year Member



Hello, thanks for the replies.
I've still got to clean it up

img { display: none; }
body { background-color: #FFFFFF; margin: 0; padding: 0; font-size: 13px; font-family: Arial, Helvetica, sans-serif; text-align: center; }
h1 { font-size: 22px; color: #000000; }
.t1 { display: none; }
.l { border:0; }
.l2 { border: 0; }
.l3 { border: 0; }
.td1 { background-color: #FFFFFF; padding: 0; }
.td2 { background-color: #FFFFFF; padding: 0; }
.ad { border-top: 1px solid #FFFFFF; }
#advert { display: none; }
#advert2 { display: none; }
.ntl { display: none; }
#content { padding-left: 2px; padding-top: 3px; }
a:link { color: #000000; }
a:visited { color: #000000; }
a:hover { color: #000000; }
a:active { color: #000000; }

Could it be the way that I've defined it to be an external print stylesheet?

<link rel="alternate stylesheet" media="print" href="print.css">

is what I used.

Thanks, again.

grahamstewart

4:14 pm on Apr 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try changing the "alternate stylsheet" to just "stylesheet".

You are not defining an alternate, you are defining the default sheet for the "print" media device.

pageoneresults

4:17 pm on Apr 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'd also recommend changing the font-size to 12pt which is the suggested unit of measurement for print (pt).

The 12pt size is what I've finally decided on after hours of testing and research.