Hi all,
Hopefully can shed some light on this as I’ve run out of ideas and it’s driving me mad. Yes you’ve guessed it, it concerns IE6 and CSS.
In short. I have a website, a two column design. The right column has a DIV by the name of right-body that controls the padding/margins from the left and right sides of that column.
I have an image that must stick out from the left side, that is right from the first pixel from the left side of the right column.
Firefox and Opera are working wonderfully but IE6 is just not playing ball. If I do the code as it is for Firefox/Opera it will always cause the image to stick out from the left side of the right column by 18px.
The only way I can trick IE6 into displaying the image correctly is by:
<!–[if IE 6]><style type=“text/css”>#right-body { margin-left: -18px; }</style><![endif]–>
The problem with that is it causes the left margin to move left for all the content in that right column. It fixes one problem but creates another.
This is the right column DIV:
#right-body {
float: right;
width: 200px;
padding: 40px 48px 40px 29px;
}
The image is position by its own DIV:
#content_left_image img {
vertical-align: text-top;
float: left;
padding: 0px 10px 0px 0px;
margin:8px 8px 8px 8px;
}
It seems no amount of tweaking the padding/margin inside the CSS file affects IE.
I’m already forcing the image as far left as I can in IE6 by <!–[if IE 6]><div id=“content_left_image” style=“margin-left: -48px; margin-top: 20px;”> <![endif]–> but this still needs the <!–[if IE 6]><style type=“text/css”>#right-body { margin-left: -18px; }</style><![endif]–> above to force it to move.
Am I missing something simple or is IE6 just going to win this one?
Thanks in advance, really appreciated.