Design Groups wrote:

>I've seen a lot of requests (in my searches for this answer) for people 
>who want to display background images with CSS.  It seems I want 
>something different, and I can't seem to find the answer to this.  I'm 
>hoping you all can help :)
>
>What I want to do is display the alt text for my images, instead of the 
>images themselves, in the printed page.  I don't want any images to 
>print out at all - just the text.  However, if I put "img 
>{display:none;}" in my print stylesheet, the images disappear - but so 
>does the alt text. 
>
>Is there a way to tell the print stylesheet "img {display:none - but 
>show the alt text;}"? Or will I just need to find a script or something 
>that'll do this for me?  (I'd much rather just use CSS if I can!)
>
>Thanks :)
>
>~Shelly
>
Hi Shelly,
If you are willing to copy the alt-text and paste it in a <span> in the 
html, just after the </img>, you don't need a script.
This span can be hidden at screen, and the image can be hidden on print. 
Screen and paper happy. ;-)
See testpage printed texts instead of images 
<http://home.tiscali.nl/developerscorner/css-discuss/test-no-print-images.htm>.

Greetings,
francky

PS
I don't understand why Opera is showing the body-background (color and 
img) while turned off in css at print (in FF and IE no problems here). 
Maybe an Opera-specialist in the list can tell?


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to