Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Print Background Image in CSS

0 views
Skip to first unread message

phpMax

unread,
Sep 27, 2006, 4:28:27 AM9/27/06
to
Hello

I want to print a <td> background image when I print a web page. I am
using this following code, but no result. Anyone there to help?

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
@media print {
tr,td,p,body {
font-family: Tahoma, Arial;
}

.tdbg{
background:#00CCCC
background-image:url(../images/i_01.jpg);
width:249px;
height:27px;
}
img{
display:block;
}

}
@media screen {
tr,td,p,body {
font-family: Tahoma, Arial;
}

.tdbg{
background-image:url(../images/i_01.jpg);
width:249px;
height:27px;
}

}
-->

</style>
</head>

<body>
<p>&nbsp;</p>
<table width="249" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td class="tdbg">&nbsp;hello</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>

Photubias

unread,
Nov 17, 2006, 4:26:33 PM11/17/06
to
try using single quote's:

background-image:url('../images/i_01.jpg');

Also everything is case-sensitive, including the extension...

"phpMax" <ta...@sulata.com.pk> wrote in message
news:op.tgi25ptsil2ect@tahir...

0 new messages