4 replies [Last post]
Anonymous
Anonymous's picture
Guru
calgary,alberta
calgary,alberta

I have left-floated an image within a paragraph with the objective of
allowing the text to run adjacent to the image using the following HTML and
CSS.

<img class=\"left-floating\" SRC=\"resize_image.php?image=$story[picture]\">

img.left-floating {
float: left;
padding-right : 10px;
padding-bottom : 10px;
}

This works well is Netscape 7.02 and Mozilla 1.3b. In IE 6 however the
image is rendered below the div (#leftcolumn) which contains the image and
text. This div is below.

#leftcolumn {
position: relative;
border:1px solid #000;
background-color : white;
padding:15px;
margin-right: 250px;
}

I have changed the z-index values but can't seem to make this image
completely visable in IE6 unless I remove the background colour of
#leftcolumn.

Appreciate any comments.
David

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 3 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

z-index with floated image

Hi David,
Z-index should have no affect on anything floated.

It sounds like you are trying to do something similar to Aussiemike [url]http://www.csscreator.com/css-node/

If not, can you post a link to your page or attach an example page.

Anonymous
Anonymous's picture
Guru

z-index with floated image

Hi Tony

Not exactly the same as Aussiemike. Also this page is only on my local PC at the moment. I tried wrapping the image and text in a div. Didn't help.

Still working on this one!

David

blakems
blakems's picture
Offline
Enthusiast
UTah, USA
Last seen: 19 years 51 weeks ago
UTah, USA
Timezone: GMT-7
Joined: 2003-04-07
Posts: 60
Points: 0

z-index with floated image

Be sure to add to your selector here

img.left-floating {
float: left;
padding-right : 10px;
padding-bottom : 10px;
} 

this code.
position: relative;
along with your z-index value.

I know you have to be specific in giving position properties in IE.

-bMs-
http//www.blakems.com !important;

Anonymous
Anonymous's picture
Guru

z-index with floated image

Position: relative works well in IE.

Thanks