Forum Moderators: not2easy

Message Too Old, No Replies

transparency problem

         

Skier88

8:03 am on Sep 11, 2009 (gmt 0)

10+ Year Member



Here's the basic structure of the problem area:
body
div
ul
li
a
The body has a background and nothing else does, so it's the body's background that shows up behind the text - no problem there.

Now I add a semi-transparent png as the background of the div, and it shows up, transparency and all, when there's nothing on top of the div. But at the bottom where the ul is inside it the div's background becomes invisible, and the ul maintains the body's background.

Any ideas? Thanks for reading.

choster

10:37 pm on Sep 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's no explanation for the behavior you describe. Are you sure there is no background set on any of the child elements of the div?

Skier88

5:04 am on Sep 12, 2009 (gmt 0)

10+ Year Member



I finally fixed this - the problem was the height of the div, which was easily fixed by specifying the height. For some reason, the div was only about half as tall as its contents, even though there is no position:relative or other messiness.

swa66

5:18 am on Sep 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you set the height: that's what you get, any content in it will overflow, but not stretch the div anymore (unless in some legacy IE instances).
"min-height" might be better suited (or no height at all).