I have the following Div's aligned as show below, which works in IE8 -- but when viewed in IE7/IE6 the two divs are on top of each other and won't align side by side?
I tried display: inline; but this caused the div to move to the far left of the page? Any suggestions...? IE is a nightmare...
Have you tried adding a float of 'left' to the first block only?
If you remove the float right from the second div inside of the main container div it messes up in IE8.
I think both divs have to float left and right respectively in all other browsers. But IE6 and IE7 are showing the divs on top of each other instead of side by side...
That's odd, float: left; on the first DIV worked for me in IE9 compatibility mode; granted, the script content didn't appear for me, I tested it by applying a width, height and background color to both DIVs. I think applying float: left; to both DIVs will give a better result. If it differs in certain versions of IE, you can use conditional comments to apply separate CSS to a specific IE version.
What happens when you float both of them left? That works for me in IE6 and 7. I wouldn't be too worried about IE6, even major networks have dropped support for it because it was poorly executed and now too old to worry about. It's possible the script content is causing it not to be inline somehow.
Similar to what Frank62 might (vaguely) be suggesting, have you tried defining a height and width for the divs? Not knowing what's in the scripts (I would guess they are banner ads of some sort), they also might be throwing something else into the works that we can't account for.
Also, at this point in time, don't even waste your time with IE6. It's 10 years, and three (almost 4) versions old. Anyone still using it deserves every broken page and malicious security exploit they come across, if only for their own sheer ignorance. If you have a way to gracefully tell them to "F off" in the process, then all the better. I can still understand the need to "re-develop" for IE7.
Frank62's solution worked for us. This is the only solution that we could find that worked equally well in modern browsers like IE8+, Chrome, and old P.O.S. browsers like IE6 and IE7.
Bookmarks