howie2009
08-16-2010, 09:11 PM
Hi,
In IE7 the image called below aligns above the text instead of to the left of the text. I tried the .clearfix method but no luck. It aligns perfect in IE8 and FF. Any ideas please?
HTML:
<div class="colHeadWrapper">
<div id="img-mid-cols-1"></div><h2>Office Details</h2>
<div style="clear:both;"></div>
</div>
CSS:
div#img-mid-cols-1{ background-image:url(../images/common/main-mm-sprite.png); width:32px; min-height:40px; background-position:-783px -344px; background-image:url(../images/common/main-mm-sprite.png);
background-repeat:no-repeat; float:left;}
I tried:
<div class="colHeadWrapper">
<div id="img-mid-cols-1" class="clearfix"></div><h2>Office Details</h2>
</div>
with:
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {display: inline-block;} /* for IE/Mac */
<!--[if IE]>
.clearfix {
zoom: 1; /* triggers hasLayout */
display: block; /* resets display for IE/Win */
} /* Only IE can see inside the conditional comment
and read this CSS rule. Don't ever use a normal HTML
comment inside the CC or it will close prematurely. */
<![endif]-->
but no joy.
THANKS
In IE7 the image called below aligns above the text instead of to the left of the text. I tried the .clearfix method but no luck. It aligns perfect in IE8 and FF. Any ideas please?
HTML:
<div class="colHeadWrapper">
<div id="img-mid-cols-1"></div><h2>Office Details</h2>
<div style="clear:both;"></div>
</div>
CSS:
div#img-mid-cols-1{ background-image:url(../images/common/main-mm-sprite.png); width:32px; min-height:40px; background-position:-783px -344px; background-image:url(../images/common/main-mm-sprite.png);
background-repeat:no-repeat; float:left;}
I tried:
<div class="colHeadWrapper">
<div id="img-mid-cols-1" class="clearfix"></div><h2>Office Details</h2>
</div>
with:
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {display: inline-block;} /* for IE/Mac */
<!--[if IE]>
.clearfix {
zoom: 1; /* triggers hasLayout */
display: block; /* resets display for IE/Win */
} /* Only IE can see inside the conditional comment
and read this CSS rule. Don't ever use a normal HTML
comment inside the CC or it will close prematurely. */
<![endif]-->
but no joy.
THANKS