<p>What I am trying to do is change the background colour of a table cell &lt;td&gt; and then when a user goes to print the page, the changes are now showing.</p>

<p>I am currently using an unobtrusive script to run the following command on a range of cells:</p>

<pre><code>element.style.backgroundColor = "#f00"
</code></pre>

<p>This works on screen in IE and FF, however, when you go to Print Preview, the background colours are lost.</p>

<p>Am I doing something wrong?</p>

[{'answer_id': 29888, 'author': 'Espo', 'author_id': 2257, 'author_profile': 'https://Stackoverflow.com/users/2257', 'pm_score': 1, 'selected': True, 'text': '<p>Have you tried hard-coding the values just to see if background-colors are showing on the print-preview at all? I think it is a setting in the Browser.</p>\n'}, {'answer_id': 29889, 'author': 'Rob Cooper', 'author_id': 832, 'author_profile': 'https://Stackoverflow.com/users/832', 'pm_score': 2, 'selected': False, 'text': '<p>Is it not recommended to do this with stylesheets? You can change the media type in the LINK statement in your HTML, so when the page is printed, it will revert to the different style?</p>\n'}]
['https://Stackoverflow.com/questions/29883', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/383/']