Suppose I have some text which is displayed over an image or some other printable colours. Is it possible to force this text to white when printing? The default behaviour is to force white to black or grey in most browsers. This clearly makes sense when you are printing text in containers with background colours/images which are removed, but doesn’t make sense to force the text in the case where you are overlaying text on images.
I should probably mention that I am quite aware of the print stylesheet, it just so happens that regardless of setting the font colour, in IE/chrome/firefox, the font does not appear white regardless. It ends up black or grey depending on the browser. Please show an example of white text over an image if you think it’s actually possible.
To illustrate see:
I personally don’t think it’s possible due to the way printing works. It’s pretty annoying none-the-less.
This is not entirely in control of the web page author.
For example, this fiddle will print (at least it did for me on a Dell 1720 Laser Printer) white text on any of the three black backgrounds in
IE9
if the user has checked the box found next to:
If that box is unchecked, then it will not print the black at all on the first two, but will on the last (since it is an
imgtag), but it prints the text as a grey, even over theimgtag. Thus, it seems that the setting for “Print Background Colors and Images” affects how the browser interprets the text, and will allow a true white (knock-out effect) if checked, but not if unchecked.Firefox
Checkbox found here (which seems to work):
For Chrome? Web Page Author Controlled?
I have not yet verified whether the information from this post will do it or not (it does not work for me on my next fiddle, but it may be because it is in an iframe). For elements that should print in Chrome, try setting: