Forum Moderators: not2easy

Message Too Old, No Replies

Image position inconsistency

         

dumbasdirt

3:27 pm on Jun 8, 2005 (gmt 0)

10+ Year Member



I am trying to understand why IE 6.02 is displaying an image I have floated in a drastically different spot than when viewed in other browsers.

here is the css:

.sectionimage {
width: 250px;
height: 122px;
margin: 70px 120px 0px 0px;
padding-top: 7px;
padding-bottom: 7px;
float: right;
background-image:url(images/welcome.gif);
background-repeat:no-repeat;
}

In IE 6, the image is displaying far to the left of the other browsers.

Why is this, and what can I do to get it to display roughly where the other browsers are showing it?

thank you

girish

3:29 pm on Jun 8, 2005 (gmt 0)

10+ Year Member



declare your left and right paddings and see what happens.

benihana

3:35 pm on Jun 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



its the doubled margin float bug in IE.

When you float something, and have a margin on the side you are floating towards, IE bizarely doubles it. In this instance making 120 to 240.

Adding display:inline; to your style will fix it.

Ben

dumbasdirt

3:36 pm on Jun 8, 2005 (gmt 0)

10+ Year Member



thanks for the suggestion.

when I specified padding-left and padding-right as 0px it didn't make a difference.

any other suggestions?

dumbasdirt

3:40 pm on Jun 8, 2005 (gmt 0)

10+ Year Member



benihana--

that worked!

thank you very much! Where can I learn more about the double float bug in IE?

thanks