views:

71

answers:

1

So I built some complex ajaxy jquery module on my homepage, with the help of "scrollable" from flowplayer.org.

It works fine for me on Chrome, Opera, Firefox ... but of course IE is not playing friendly (regardless of the version, from my testing).

Objects are not displaying exactly where they should, some are overlaying each other, and when a click a button some divs just disappear.

However, if I resize the IE browser window up and down, the display mostly fixes itself. Then if I click on one of the buttons I made, it messes it up again. Until I resize the window again and it looks fine.

To see the problem:

(note the forceshowIE=1, because by default I hide it for IE people)

I was thinking maybe there is a way to force IE to redraw the entire module sometimes? Or maybe someone has a better idea on how to fix the underlying problem?

Source code is available here:

http://www.makemeheal.com/mmh/scripts/recentHistory.js

http://www.makemeheal.com/mmh/styles/recentHistory.css

Thanks

+1  A: 

You are missing a doctype declaration at the top of the file, this is causing IE to revert to quirks mode. Providing a doctype will cause IE to render in standards mode. (cant say IE6 will still behave, but IE7/IE8 should be more consistent with the other browsers)

Try putting this at the top of the main file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

Hopefully that fixes it.

David
You got me so excited, it looked so simple. Unfortunately, it did not work ...
nute
You put the doctype inside the head, it needs to be the first line of the document above <html>. Still cant guarantee thats it, but try it.
David
You're my hero! I'm still testing around but it looks good so far. Wooo I've been looking for an answer for weeks!
nute
oh no ... it actually broke everything else in FIREFOX
nute
DOH, sounds like firefox was compensating for quirks mode. What are the main problems you are seeing in IE when the doctype is removed? It didn't look that messed up to me, but if you point out some of the things, I can look at it.
David
I am loathe to recommend this, but if everything is fine otherwise, you could dynamically add the doctype if IE was detected server side, not add it otherwise. At least as a stop-gap until you can troubleshoot the code more.
David
I did a conditional doctype, it works so far ...
nute