Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

Float problems in IE6

Hi

I am having trouble with two <divs> side by side. All works fine in all modern browsers - but in IE6 the 'float' is not working properly and the right-hand div appears beneath the left-hand one (instead of alongside). I gave up building for IE6 some time ago - but unfortunately in this instance the client is using IE6 and doesn't appreciate the need to upgrade. The example is here: http://www.colt60seconds.net/2009-05/web/story2.asp

0
beverleydunster
Asked:
beverleydunster
1 Solution
 
Brian WithunCommented:
Check the widths of the divs.  I have had a similar problem with IE where the two divs were exceeding the width of their container and the "right" div had wrapped around and became the "lower" div.

Try shrinking the right div, or expanding the width of the container that the left & right divs are in.  By shrinking them (by 50px or so) you will determine if this IS the problem, and then you can figure out why IE is rendering your divs too wide.

One technique I use is to turn on borders for all divs.  (1px solid black) just to see how big and where these divs are.  background colors work well for this, too.

0
 
David S.Commented:
Try giving ".news" float:right for IE6.
0
 
Britt ThompsonSr. Systems EngineerCommented:
It may have something to do with your margins or padding and there's a big long reason online that explains why IE6 renders the padding margins different if you need me to find it. You'll probably have to attach a separate IE6 stylesheet like so (this only opens for ie6 or less):

<!--[if lte IE 6]>
<link REL="stylesheet" type="text/css" href="ie.css">
<![endif]-->

Then, within that style sheet work with the margins and or padding on the div's styles in question making them smaller or maybe even negative to get them to fit properly. There's a chance it's just the width of the divs themselves.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now