Floating not right in ie ?

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-03-13T18:41:24Z Indexed on 2010/03/13 18:45 UTC
Read the original article Hit count: 248

Filed under:
|

Hi, i want to do like the following format:

alt text

So this is what i did :

<style>
.toptitle{
 font-size:14px;
}
.toprating{
background:yellow;
float:left;
font-size:12px;
}
.topcontainer{
border-bottom:1px #CCCCCC solid;
}
</style>

<div class="topcontainer">
<div class="toprating">256</div>
<div class="toptitle">Lorem Ipsum...</div>
</div>
<br>
<div class="topcontainer">
<div class="toprating">256</div>
<div class="toptitle">Lorem Ipsum...</div>
</div>

Now, in firefox,chrome,safari, this works perfectly, but in IE the title goes about 30 px down.

Is there a mistake in the code, or is there any better code to do this?

© Stack Overflow or respective owner

Related posts about css

Related posts about XHTML