Forum Moderators: open

Message Too Old, No Replies

<td>

using backgrounds

         

fashezee

1:50 pm on Oct 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What browsers do not support the background attribute of the <td> tag?

tedster

3:04 pm on Oct 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In a table cell, "background=" was never adopted as a standard attribute, so it's definitely use at your own risk

Where browsers have supported it, it takes the URL of an image as its argument. Netscape 3 and lower did not support background for table cells. Netscape 4 gives odd results when the table cell contains a nested table. I also remember that some versions of IE 4 and early 5 gave very peculiar results when the image was a jpg, but IE always handled a gif image just fine. IE 6 and Netscape 6/7 handle it just fine

Instead of a background attribute, (which can't even be deprecated because it was never in the HTML standard in the first place) I think it's much better to use the style="background-image:(url)" and "future proof" your code. The background-image: selector can be applied to ANY element, whether it's inline or block level.

jetboy_70

3:07 pm on Oct 21, 2003 (gmt 0)

10+ Year Member



If you are bothered about NN4 with nested tables, just use a transparent gif as the background in the nested table. This'll prevent it inheriting the parent's background.

tedster

3:19 pm on Oct 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks - I didn't know about the transparent gif work-around. Sheesh, a work-around for non-standard HTML. Using background="null" in the nested table also stops the image re-tiling problem.

fashezee

3:43 pm on Oct 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




it was never in the HTML standard in the first place

I wonder why macromedia made background for TD tags available?

DrDoc

3:50 pm on Oct 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...because many browsers support the attribute.
And, macromedia is hardly anyone to look to for 100% standards compliance.