Forum Moderators: not2easy

Message Too Old, No Replies

IE Table BG Image

Also applies BG to all cells?

         

Kolyana19

7:05 pm on Sep 11, 2005 (gmt 0)

10+ Year Member



Take something like this:
table#wide {
background: url(../../../../images/T/2/wide_0.jpg) no-repeat;
}

The desire is to have a single image as the background to the table "wide".

This works great in FireFox, but in IE all of the TD also apply the same background *individually* to themselves, so the net result is mutliple copies of the same image.

How can I stop the style cascading to all the children TDs, without specifically applying "background-image: none;" to all TR's and TD's? or is that what I have to do in IE?

encyclo

7:15 pm on Sep 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I remember correctly, this is a Quirks Mode vs. Standards Mode [webmasterworld.com] problem. What doctype are you using in your HTML, if any?

You should be using a doctype which triggers standards-compliance mode. If you're not sure, try this one:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Kolyana19

7:46 pm on Sep 11, 2005 (gmt 0)

10+ Year Member



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Kolyana19

7:46 pm on Sep 11, 2005 (gmt 0)

10+ Year Member



Hm, I appear to be using the same as you, but it's not working?

jessejump

9:04 pm on Sep 11, 2005 (gmt 0)

10+ Year Member



In IE6, it works with or without a doctype for me.

Kolyana19

9:42 pm on Sep 11, 2005 (gmt 0)

10+ Year Member



>> In IE6, it works with or without a doctype for me.

Then I wonder why my CSS (as given above) is applying the table bgimage to itself *AND* all cells?

If I apply a bgimage of 'none' to either the tbody, tr or td, it halts the cascade and correctly applies the image just to the table itself.

Could anything I'm doing cause this behavior?

jessejump

10:47 pm on Sep 11, 2005 (gmt 0)

10+ Year Member



What's the whole style sheet? And the table?