Josh
Josh

Reputation: 16532

IE9 doctype causing issues

I am experiencing severe frustration with IE9.

My application has this doctype defined, which has worked perfectly fine in every other browser until now.

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

I even tried this meta tag, with no success

<meta http-equiv="X-UA-Compatible" content="IE=100" >

With the doctype on, all of my heading tags disappear. With it off, My headings appear, but javascript doesn't work (not even an alert), and my css is messed up way worse than not having headings.

Upvotes: 1

Views: 5442

Answers (2)

lhan
lhan

Reputation: 4635

For what it's worth, I just ran into a similar issue developing a page but the Validator mentioned above won't work because I'm still testing locally. (I didn't see a way to test it anyway?). What I did find, though, was this article. My problem was a CSS style (overflow: hidden) not working in IE9 with the doctype defined (same as in original question). The fix for IE9 was to add position:relative to the same object which I was using overflow:hidden.

Hopefully this helps someone else too, as I spent about 2 hours searching for my solution.

Upvotes: 1

Sparky
Sparky

Reputation: 98738

Run your code through a validator...

http://validator.w3.org/

It will help you identify each item not supported by your Doctype. I'm not excusing IE 9, but there is nothing wrong with your Doctype, therefore there has to be something wrong in your HTML.

Upvotes: 3

Related Questions