Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Float problems in IE6

Posted on 2009-05-12
3
Medium Priority
?
277 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 43

Accepted Solution

by:
David S. earned 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

721 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