Nathan H
Nathan H

Reputation: 49451

IE Display Bug, jQuery bug

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

Upvotes: 0

Views: 292

Answers (1)

David
David

Reputation: 2795

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">

Hopefully that fixes it.

Upvotes: 2

Related Questions