Forum Moderators: not2easy
<td style="background-image:url(http://www.example.com/images/top.gif)"></td>
I just can't get this to work when putting it in an external CSS file.
I realise that I could get rid of the table entirely and put the whole thing in CSS but I'm simply not fluent enough in CSS to do this.
So is there a way of getting this to work with an external CSS file, while keeping the table?
Thanks.
<td style="background-image:url(http://www.example.com/images/top.gif)"></td> I realise that I could get rid of the table entirely and put the whole thing in CSS but I'm simply not fluent enough in CSS to do this.
Same here. But, I think I can help.
So is there a way of getting this to work with an external CSS file, while keeping the table?
I believe you could just set up a generic class that has a background image. Something like this...
.tdbg1{
background-image:url(http://www.example.com/images/top.gif);
} And then assign that class to the <td> like so...
<td class="tdbg1"> </td> You may have to use some additional background positioning rules but the above would be a start I think. :)
P.S. Be sure to include the if its an empty <td> </td> element.
background:url(/images/top.gif) top left repeat-x;
This is particularly useful if your site accesses this style sheet via https as well as non-https.