Forum Moderators: not2easy

Message Too Old, No Replies

printing background color

         

natty

2:41 pm on Aug 10, 2004 (gmt 0)

10+ Year Member



hi all,

i have a page, using two stylesheets.
one with
media screen
and one with media print.

basically the pageis a table. when in screen 'mode' the background-color is set to grey/white on alternate rows.(class name odd/even)
i have the same rule in the print style, yet the backgrounds are not showing.

any ideas..?
tia

css is as follows


<style type="text/css" media="screen">
<!--
body{padding: 10px; font: normal 0.8em Verdana;}
.heading{font-weight:bold;}
.odd{background-color:#EfEfEf;color:#000000;}
.even{background-color:white;color:black;}
table{border: 1px solid black;margin-left:auto;margin-right:auto;margin-top:5px;}
input{font: normal 0.8em Verdana;}
-->
</style>
<style type="text/css" media="print">
<!--
.odd{background-color:#EfEfEf;color:#000000;}
.even{background-color:white;color:black;}
input{display:none;}
-->
</style>

DrDoc

2:25 pm on Aug 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Which element is the class name applied to?

natty

11:27 am on Aug 17, 2004 (gmt 0)

10+ Year Member



trs.. i take it thats a no no then ..?
although i just tried it on the tds also with no luck..
is this actually possible?

cheers,

nat

katana_one

12:31 pm on Aug 17, 2004 (gmt 0)

10+ Year Member



This is not a CSS problem, it is a browser setting. The default setting for most browsers is to omit background colors and images when printing.