It often works out great that the CSS backgrounds don't print, however, sometimes I use them to convey contextual information. What is the best way for getting around CSS backgrounds that don't print but you really want to display. The example, I'm currently working on is a table that displays financial information. Different background colors are used to indicate how "good" a number is (e.g. very profitable, profitable, neutral, negative, very negative).
A:
You could make the font bigger and/or bold and/or italic and/or colorful.
bchhun
2009-01-22 04:05:55
+1
A:
I ran into the same problem color coding tabular data in html, eventually I just switched to pdf generation for color printouts and only made black and white available in html
Element
2009-01-22 04:14:58
+2
A:
I've used borders to simulate backgrounds when I really need a background color. Something like this will work (but I apologize for not having tested this):
div.must-have-background-for-print {
position: relative;
width: 400px;
}
div.must-have-background-for-print div.background {
position: absolute;
top: 0;
left: 0;
height: 100%;
border-left: 400px solid #999;
}
Prestaul
2009-01-22 04:21:42
+1
A:
It's a browser settings. Turn on background printing in IE. So, you can either change the browser settings (possible if on an intranet) OR just export your report to Excel or some other format for printing.
EndangeredMassa
2009-01-22 05:13:22
+2
A:
Two suggestions:
- Color-code text in the table rows
- Add color-coded icons to the beginning or end of the table rows
You could even incorporate these into the normal view with your background colors.
Jeremy Kratz
2009-01-22 18:11:46