change image and font color when printing

hi,

in my style sheet i have the following to display normally with color.
****************************
<div id="logo-color">
<img src="cs00/logocolor.gif" width="290" height="88" alt="" />
</div>
<div id="colorfont-address">Pl2-4<br />P.O. Box 5<br />lan Ant</div>
****************************

but now when printing i need to change the img logocolor.gif in logo-color div to logocolorBAW.gif img in order to get the black and white logo to print and i need also the colorfont-address div to change BAWfont-address when printing.
how can make this to work when printing in the print css. please some code help.

here the css link i am using in the top of my stylesheet i am using:
<link rel="stylesheet" type="text/css" href="cs00/cuunt.css" />
<link rel="stylesheet" type="text/css" href="cs00/cuunt_print.css" media="print" />
eawebAsked:
Who is Participating?
 
PhatzerConnect With a Mentor Commented:
Try this:

//// REPLACE:
 
<div id="logo-color">
<img src="cs00/logocolor.gif" width="290" height="88" alt="" />
</div>
 
//// WITH:
 
<div id="logoimage"></div>
 
//// ADD IN 'cuunt.css':
 
div.logo-color {
    background-image: url(cs00/logocolor.gif);
    background-repeat: no-repeat;
    height: 88px;
    width: 290px;
}
 
//// ADD IN 'cuunt_print.css':
 
div.logo-color {
    background-image: url(cs00/logocolorBAW.gif);
    background-repeat: no-repeat;
    height: 88px;
    width: 290px;
}

Open in new window

0
 
PhatzerCommented:
Have you tried calling them as so:
<link rel="stylesheet" type="text/css" href="cs00/cuunt.css" media="screen, projection" />
<link rel="stylesheet" type="text/css" href="cs00/cuunt_print.css" media="print" />

Open in new window

0
 
eawebAuthor Commented:
i understand that but when print i need to change the color image:
<img src="cs00/logocolor.gif" width="290" height="88" alt="" />
to a black and white image
<img src="cs00/logocolorBAW.gif" width="290" height="88" alt="" />
how can i do that in the print css?



0
 
PhatzerCommented:
Sorry, you need to remove the 'cs00/' part from both background-image attributes, as they are in the same directory as the CSS I believe.
0
All Courses

From novice to tech pro — start learning today.