Welcome to WebmasterWorld Guest from 50.17.79.100

Forum Moderators: not2easy

Message Too Old, No Replies

floating containers overlapping

     

leondn

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

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

10+ Year Member



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

2:46 am on Feb 13, 2013 (gmt 0)

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



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

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



Works great!

Thanks!

leondn

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



Sorry about the link post.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month