Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Background Image Problem

Backgrounds and DIV tags not mixing...



8:52 am on Jun 1, 2005 (gmt 0)

10+ Year Member

I'm having a bit of a problem.

I have a background image, which goes across three different DIV tags. I've currently got it set up so that these three DIVs sit within one table cell, with the background set on the cell...except that the DIVs are refusing to pick up the background image and, instead, are displaying the page background.

Is this a fundamental problem with DIVs not wanting to pick up the background of the DIV/table cell behind them? Or have I just done something incredibly braindead?

Please help!



8:58 am on Jun 1, 2005 (gmt 0)

10+ Year Member

Colour me very embarrassed - I've just found my answer... I needed to set a height on the table cell.

I knew I had to be doing SOMETHING stupid.


*goes away looking sheepish*


11:50 am on Jun 1, 2005 (gmt 0)

10+ Year Member

If it works for you, I guess that's fine, but a height on a td is invalid HTML.


12:34 pm on Jun 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Could you ditch the table placing your divs inside another with the background image/height set in the CSS file. That'll validate.


12:48 pm on Jun 1, 2005 (gmt 0)

10+ Year Member

I have done - I went back to the table in an effort to try and get SOMETHING showing. Once I figured out my problem (not setting a height), it worked fine and I could transfer it back to being a DIV within a DIV.

Featured Threads

Hot Threads This Week

Hot Threads This Month