Solved

Float problems in IE6

Posted on 2009-05-12
3
273 Views
Last Modified: 2013-12-08
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
Comment
Question by:beverleydunster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Expert Comment

by:Brian Withun
ID: 24368545
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
 
LVL 42

Accepted Solution

by:
David S. earned 500 total points
ID: 24369586
Try giving ".news" float:right for IE6.
0
 
LVL 30

Expert Comment

by:Britt Thompson
ID: 24369623
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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question