I'm working on drawing shapes in my ASP.NET web app. In IE9 and other browsers, I'm doing it with SVG, and it's working great. In IE8 and below, I'm using VML. I'm finding that IE8 does not display the VML at all when it's in IE8 Standards mode (not using compatibility view).
My doctype is set to <!DOCTYPE html>
. If I take the doctype away entirely, IE8 goes to quirks mode and works fine, but IE9 then goes to its quirks mode (instead of IE9 Standards) and doesn't display the SVG.
This is happening on a test page, so there's nothing there besides the form containing a div containing either the <svg>
element and its children or the VML elements.
What is going on here? It seems like I shouldn't have to change the doctype for different browsers, and the reputation graph on Stack Exchange's user page appears to work the same way (VML for IE8 and below, SVG for everyone else, HTML5 doctype)...
<!--[if IE 8]> <!doctype ... > <![endif]-->
I know it's not what your asking, but it might be an alternate solution. – Nicias