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
Solved

Float problems in IE6

Posted on 2009-05-12
3
270 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
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

860 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