homepage Welcome to WebmasterWorld Guest from 54.196.136.119
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
floating containers overlapping
leondn




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

Help!

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:
[kr-lab.mit.edu...]

The image and the text are supposed to be side-by-side, but instead are overlapping on top of each other.

 

Paul_o_b




msg:4545043
 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.)

lucy24




msg:4545146
 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.

leondn




msg:4545432
 7:30 pm on Feb 13, 2013 (gmt 0)

Works great!

Thanks!

leondn




msg:4545433
 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