3 replies [Last post]
WCW
Offline
Regular
Last seen: 17 years 37 weeks ago
Joined: 2004-12-03
Posts: 13
Points: 0

Hi guys!

I have a webpage which consists of a few images & backgrounds,

But is there a way in CSS to just have the text printed off when it comes to printing?

If so how is this done?

Cheers!!

WCW
Offline
Regular
Last seen: 17 years 37 weeks ago
Joined: 2004-12-03
Posts: 13
Points: 0

Sorted

Hi again Guys,

I've got the probem sorted.

But would still be interested to hear any comments on this issue.

many thanks!

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 16 weeks 3 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Printing With CSS

Not sure how you did it, but the simplest way would be to use a seperate print sheet, called like so:

<link rel="stylesheet" type="text/css" href=print.css" media="print" />

then in it, use the following:

img.class {
display: hidden;
}

you could use display: none.

(don't take this as gospel though - I've never used print stylesheets, I just thought this should work.)

Verschwindende wrote:
  • CSS doesn't make pies

WCW
Offline
Regular
Last seen: 17 years 37 weeks ago
Joined: 2004-12-03
Posts: 13
Points: 0

Printing With CSS

Hi thepineapplehead,

That's exactly the method I went for Laughing out loud

Seems to work a treat.

Thanks!