1 reply [Last post]
stu20001
stu20001's picture
Offline
Regular
Last seen: 13 years 24 weeks ago
Joined: 2003-06-23
Posts: 30
Points: 0

Hi

Just experienced something that I'm wondering if its an IE6 bug, something in my code or a bit of both (as it doesn't happen in Mozilla)

Basically I have a DIV. Within that DIV I have a P and within that P there is an image. The div has a background-color set within the css.

At first, although the space for the image was clearly there, the image wasn't appearing. The only way to see it was for me to remove the background-color attribute - the image was disappearing behind the DIVs background.

After a lot of trial and error I discovered that this has something to do with the 'align=left' attribute I had given the image and if I removed that then the image would appear.

This is the relevant CSS code where 'middle' is the DIV in question:

#middle {
position:relative;
margin: 0px 212px 20px 172px;
padding: 10px;
border-right: 1px solid #339966;
border-left: 1px solid #339966;
background-color: #e1e1e1;
z-index: 1;
}

(No other css is required as I can recreate the problem with just this)

I'd be grateful for anyone's thoughts on this...

stu20001
stu20001's picture
Offline
Regular
Last seen: 13 years 24 weeks ago
Joined: 2003-06-23
Posts: 30
Points: 0

IE6, images and div backgrounds

OK - well no-one has answered but I found the prob and it is an IE6 bug

For those have come across this post looking for tips on the same problem, the answer is here: http://www.positioniseverything.net/articles/hollyhack.html