homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

floating containers overlapping

Msg#: 4545020 posted 7:17 pm on Feb 12, 2013 (gmt 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.



10+ Year Member

Msg#: 4545020 posted 7:50 pm on Feb 12, 2013 (gmt 0)

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.)


WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4545020 posted 2:46 am on Feb 13, 2013 (gmt 0)

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.


Msg#: 4545020 posted 7:30 pm on Feb 13, 2013 (gmt 0)

Works great!



Msg#: 4545020 posted 7:32 pm on Feb 13, 2013 (gmt 0)

Sorry about the link post.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved