Jump to content

Strange float bug in IE


jumpenjuhosaphat

Recommended Posts

I have found several mentions of bus on the internet concerning IE floats and images, but none seem to address my problem.

 

<!-- *********TOP CONT In********** -->
    <div class="real_top_cont">

      <div class="real_right"> 
       <?php if (isset($primary_links)) { ?><?php print theme('links', $primary_links, array('class' => 'links', 'id' => 'navlist')) ?><?php } ?>
      </div> 

      <div class="real_top">
       <img src="/themes/real_estate/images/top-image.jpg">
      </div> 

    </div>
<!-- *********TOP CONT Out********** --> 

 

ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input,div,a,img
{
padding:0;
margin:0;
border:0;
line-size:0;
}

h1,h2,h3,h4,h5,h6,pre,code 
{ 
font-size:1em; 
}

a img,:link img,:visited img 
{
border:none
}

ul,ol,li
{
list-style:none
}

body
{
background-color:#4A6529;
text-align:center;
color:#FFFFFF;
}

.real_main
{
margin:0 auto;
width:790px;
text-align:left;
background-color:#637D39;
background-image:url('/themes/real_estate/images/back.png');
background-repeat:repeat-y;
border-left:2px solid #FFFFFF;
border-right:2px solid #FFFFFF;
}
.real_content
{
width:556px;
float:right;
}

.real_right
{
float:right;
width:232px;
height:217px;
background-color:#CCCCCC;
}

.real_top_cont
{
border-bottom:2px solid #FFFFFF;
height:217px;
}

 

The problem that I am having is that in IE, the image that is supposed to appear on the left of the .real_right div is falling below.  I have tried adjusting the width until it was obvious that the image should clear the .real_right div, but the image still drops below as if I haven't floated it at all.  The site that I am working on is http://www.mobile-home-sales.com

 

Also, on the same site, in the .real_top_cont div, in IE there is a space between the image and the 2px border bottom which I don't want to be there.  I have tried making the image a block, tried removing the baseline alignment, and given a line-height of 0 to it's container, yet for some reason, the space is still there.

 

Thank you for any help of advice that you might offer.

Link to comment
https://forums.phpfreaks.com/topic/93130-strange-float-bug-in-ie/
Share on other sites

Cannot see that site with that link.  It is possible that this might be a solution.  With floating, the element always prefers a higher position over one further to the left or the right.  So, in a smaller screen (or small div), it will do what I believe you are talking about.  If so, that's normal (and irritating).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.