Quirks Mode

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Quirks Mode

omaroman
I'm using the latest version of Thymeleaf 2.0.11 for a project that must work in Internet Explorer 6. My CSS uses "box model", but in IE6 doesn't render fine. I'm been doing some research (http://en.wikipedia.org/wiki/Quirks_mode) and I think I must active "quirks mode".

I'm my templates I have the following at the very top:

<!-- This comment will put IE 6, 7, 8, and 9 in quirks mode -->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring3-3.dtd">
<html>
...
</html>

But in the generated HTML, those lines are inverted and the "Quirk Mode" is never activated.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- This comment will put IE 6, 7, 8, and 9 in quirks mode -->
<html>
...
</html>

Any suggestions?
Reply | Threaded
Open this post in threaded view
|

Re: Quirks Mode

danielfernandez
Administrator
Hi,

Unfortunately, the current implementation of DOCTYPE output in Thymeleaf actually wants to make sure you don't accidentally put your browser in quirks mode --which is considered always bad--, and that's why DOCTYPE is output at the very beginning of the page no matter where it was at input.

I've added this as a "future work" topic to work on: https://github.com/thymeleaf/thymeleaf/issues/44 but I'm afraid I cannot give you a version number when something like this would be implemented.

In the meanwhile... have you thought about using IE6 conditional comments, instead of willingfully triggering Quirks Mode? http://www.quirksmode.org/css/condcom.html

Regards,
Daniel