Forum Moderators: not2easy

Message Too Old, No Replies

Float margin getting doubled in IE

         

ababo

12:46 am on Apr 25, 2006 (gmt 0)

10+ Year Member



Hi there. I seem to have a bit of a problem with some code I've typed up. The page consists of a background image and some divs that I align with the image using float positioning and some margins. the problem I'm having is that IE seems to double the margin that I specify. That is, I put in a margin of 30px, and IE makes it 60px! It seems to work ok in Firefox though. Here's the CSS to let you see:


body
{
background: #B1B1B1;
font-family: "Arial";
font-size: 75%;
}

#container
{
margin-left: 100px;
width: 730px;
background-image: url(../images/clean/content.png);
background-repeat: repeat-y;
text-align: left;
}

#sidebar
{
float: right;
margin-right: 30px;
width: 195px;
height: auto;
clear: right;
}

* html #sidebar
{ /* This is the Tan hack */
width: 205px;
w\idth: 195px;
}

#head
{
background-image: url(../images/clean/head.png);
width: 730px;
height: 160px;
clear: both;
}

#content
{
width: 440px;
height: auto;
margin-left: 15px;
float: left;
clear: left;
}

#foot
{
background-image: url(../images/clean/foot.png);
height: 60px;
clear: both;
}

I'm guessing it'll most likely be something silly that I haven't noticed, which is usually the case. :-s The page is up at [ababo.co.uk ] if you need to check it out. Any help would be much appreciated. :)

Daniel

ababo

1:00 am on Apr 25, 2006 (gmt 0)

10+ Year Member



It's ok! I found a solution at [positioniseverything.net ]. :D

Daniel