Search code examples
htmlinternet-explorersvg

SVG not rendering IE 11


I've the html code here. The svg does not render with IE 11. Can't find out why.

I've added as seen in another place :

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

I suspect the image is here but not visible. Or it could be the large data= which is not interpreted correctly. How to check ?


Solution

  • What I've done to make it work :

    In the svg file :

    1. add <?xml version="1.0" encoding="utf-8" standalone="no"?>
    2. add <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/SVG/DTD/svg10.dtd">
    3. remove height & width properties
    4. add xmlns="http://www.w3.org/2000/svg" in the svg markup

    In the html file :

    1. use an img element instead of object : <img src="..." style="width:95%;height:60%" />