Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

floating containers overlapping

7:17 pm on Feb 12, 2013 (gmt 0)

New User

5+ Year Member

joined:Feb 12, 2013
votes: 0


I'm having a problem where two div containers with float:left is placed inside a larger div container. For some reason this works very well in Firefox and Chrome but not in IE9. Does anyone know why this is?

The page is:

The image and the text are supposed to be side-by-side, but instead are overlapping on top of each other.
7:50 pm on Feb 12, 2013 (gmt 0)

Junior Member

10+ Year Member

joined:May 28, 2003
votes: 4

Most likely cause is that you have a script above the doctype which throws IE into quirks mode and behaves more like ie5 than anything built this century. Always remove all content from above the doctype including comments.

(The 1.1xhtml doctype isn't suitable either unless you are doing content negotiation.

Use 1.0

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


(BTW links are not allowed.)
2:46 am on Feb 13, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
votes: 743

Aw, heck, let me cut & paste what I just-this-instant finished saying next door in HTML. (This is really true.) You're not allowed to link to your own site; in fact a moderator will come along eventually and delete the link. This is OK because...

...there's an extra reason for [the rule] in the "how-to" forums like HTML and CSS. People need to see the exact code that's causing the problem, not the site as it exists tomorrow or next week or in 2014 (for readers coming along later).

So you need to post the relevant HTML and CSS. Not the whole thing! Part of your job is to figure out which bits of the code are causing the problem. For example if the issue involves positioning of the header, we do not need to know what font the footer uses. Quote only as much code as you need to reproduce the problem.

Does the HTML and/or CSS use absolute links beginning in / slash? If so, it will only work locally if you have a pseudo-server like MAMP or WAMP. These are easy to use and install-- at least the Mac version is --and the basic versions are free, so you should go download it if you haven't already.
7:30 pm on Feb 13, 2013 (gmt 0)

New User

5+ Year Member

joined:Feb 12, 2013
votes: 0

Works great!

7:32 pm on Feb 13, 2013 (gmt 0)

New User

5+ Year Member

joined:Feb 12, 2013
votes: 0

Sorry about the link post.