Reputation: 675
Here is my code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
.bg
{
position: absolute;
top: 0;
left: 0;
z-index: 0;
}
.cell
{
color: #FFFFFF;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
</style>
</head>
<body>
<img src="Images/Footer.gif" class="bg" />
<span class="cell">
160,000,000
</span>
</body>
</html>
I used IE8 to printing this page but IE changed white color to gray, How can I prevent this change?
Thanks
Upvotes: 4
Views: 2506
Reputation: 41
The answer is not to use a print stylesheet, as IE will still print it gray. you have to turn on "print backgrounds colors and images" and set the background to black. IE thinks its smart by not allowing you to print white text on a "white" background, not realizing that perhaps you know what you are doing and want white text over the top of an image.
Upvotes: 1
Reputation: 8877
As with screen style sheets, you use the LINK
element to define the print stylesheet your web page should use:
<link rel="stylesheet" type="text/css" href="print.css" media="print">
The only difference between this link element and the link to your screen style sheet is the attribute:
media="print"
Most style sheets are written for the screen, so the media can be left off, or written as:
media="screen"
Upvotes: 1