tags:

views:

39

answers:

1

Hi all,

I m using a div in my web site by using float:left and float:right after that is used clear:both, its working fine in all browser except ie7 i have tried a lot of things please tell me a solution to resolve this problem....

css:

.clear
{
    clear : both;
    margin : 0px;

} 

html:

<div style="float:left">some text</div>
<div style="float:left">some text</div>
<div class="clear"></div> 
<div style="float:left">some text</div>
<div style="float:left">some text</div>

Thanks

+1  A: 

Try adding some content to the div:

 <div class="clear">&nbsp;</div> 

A much better way to do this, though, is clearfix.

Pekka
Hi sorry but it's not working <div class="clear"> </div>
Mayur
@Mayur strange! Then I don't know what it could be, sorry. Are you sure the CSS is getting loaded?
Pekka
Pekka sorry, now i have tried a clearfix property its working thanks a lot....
Mayur