Solved

Float problems in IE6

Posted on 2009-05-12
3
267 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
Comment Utility
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
Comment Utility
Try giving ".news" float:right for IE6.
0
 
LVL 30

Expert Comment

by:renazonse
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now