views:

152

answers:

2

I have a (XHTML)page that contains a table with some cells, and some of the cells are grayed, but when i print the document in IE 8 all cells are white what am i doing wrong?

Is there some way to force IE to print the document as it is rendered?

A: 

Are you using browser safe color codes?

A code snippet would be helpful.

maxedmelon
I thought the _“web safe”_ fad died with `marquee` tags in the early double-zeros?
Alan
+2  A: 

In IE8 under Tools -> Internet Options ... under the Advanced tab there is an option under printing titled "Print background colors and images". This is the only way I know of to print background colors on a table. I've tried a number of times to do it in code to no avail. This seems to be an option that must be chosen by the user.

Scott Vercuski
even after enabling that option its still white and it does not matter if i put the background from the style attribute or a css file
Petoj
@Petoj, Unless you check that option, background colors are not printed, regardless of whether you put them in CSS, inline, or as html attributes. However, if they still don't print after enabling that checkbox, I would try to print in a different printer, just to check that it's not the printer driver the cause of the problem.
salgiza
@Petoj - It shouldn't matter if the background is CSS or image, enabling that option should allow it to printout.
Scott Vercuski
i enabled the option and it had no change what so ever, i tryed printing it normaly to a pdf and the Preview the background color didn't show up any where..
Petoj
@Petoj - do you have a code snippet I could look at?
Scott Vercuski