I am using some DHTML (via css3pie) which work fine so long as a doctype isn't declared, but once a doctype is declared, cease to function in any way. No error messages are thrown, simply no functionality is ... well, functioning. Is this a known issue with IE? Will I have to run my site in quirks mode/no doctype?
Asked
Active
Viewed 267 times
1
-
2DHTML? What is this, 2002? How about the HTML5 doctype: ` `? – Matt Ball Jun 20 '12 at 17:19
-
1@mattball Doesn't work. Any doctype stops the css3pie from working. I'm using dhtml with css3pie because I'm required to program for IE7 (industry standard for the company). If only we lived in a world where modern browsers dominated industry and not jsut the homes the tech-savy. – steventnorris Jun 20 '12 at 17:28
2 Answers
2
I'm currently using the following DOCTYPE declaration and HTML tag. In IE7 the CSS3Pie-rendered elements are displaying correctly and the page is rendering in standards mode:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

sversch
- 856
- 8
- 22
0
Use an XHTML doctype with an XML declaration followed by a newline and a comment to force quirks mode:
<?xml version="1.0" encoding="UTF-8"?>
<!-- stuff -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Paul Sweatte
- 24,148
- 7
- 127
- 265
-
Will XHTML work in IE7? I faintly recall reading somewhere that there isn't support for it. – steventnorris Jun 29 '12 at 20:12
-
[The XHTML doctype works](http://stackoverflow.com/questions/4946216/forcing-ie7-into-standards-rendering-mode-not-quirks), but the [xhtml+xml MIME type](http://blogs.msdn.com/b/ie/archive/2005/09/15/467901.aspx) only works with an [XSLT workaround](http://www.w3.org/MarkUp/2004/xhtml-faq#ie). – Paul Sweatte Jun 29 '12 at 21:10