Internet Explorer doesn't properly scale svg inside flex-box

Internet Explorer doesn't properly scale svg inside flex-box



I have an inline svg with a viewBox. When the svg is wrapped in a div, which is then inside a flexbox, the dimensions are not calculated properly by IE(11).
Here is a example of the issue:
HTML:


<div id="main">
<div>
<svg viewBox="0 0 50 100">
<path d="m0,-5 l40, 55 l-40,55" />
</svg>
</div>
</div>



CSS:


#main
background: blue;
width: 100%;
height: 100px;

display: flex;




#main > div

height: 80%;
background: red;
overflow: hidden;


svg
stroke: black;
fill: none;
stroke-width: 3px;
height: 100%;



Same code on JSbin:
JSBin



On chrome for example, it works as expected. I need a responsive design, which works in IE too and since I am using bootstrap grid (which is just a flexbox) I need a solution for this. Thank you.




0



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)