Forum Moderators: open

Message Too Old, No Replies

TD with background color doesn't print

         

skyhawk172

5:24 pm on Mar 25, 2008 (gmt 0)

10+ Year Member



Hi All,

I've trying to write a page header that is a 3 column table that has an image in column 1 and an image in column 3 (both fixed width). I want to use the center column as a percentage width that will allow me to keep the banner along the entire top of the page- no matter how the user resizes the browser width.

The images have a gradient shading transition edge to blend to the color I want to use for the center column. The problem comes when I set the center column background color. When I print or print preview the page, the center column is white. I've tried to use the background-color and background-image style properties for the center column, but I keep getting a 'hole'.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
...
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img alt="" src="images/banner_left.jpg" /></td>
<td style="background-image: url(images/banner_center.jpg); width: 50%" />
<td><img alt="" src="images/banner_right.jpg" /></td>
</tr>
</table>

I'm using IE7 under Vista. If anyone has any suggestions, that would be appreciated.

Corey.

penders

5:58 pm on Mar 25, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Unfortunately background colours and images do not print by default. This is a browser setting that the end user must enable. Saves ink etc...

You could try stretching an <img> to fill the gap and position the content absolutely on top of it?!

tedster

6:13 pm on Mar 25, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe a print stylesheet that changes the text color in that area would do it.