What could be causing the <div>
not to automatically adjust its height based on the inner <svg>
element in this particular situation?
CSS
#curve-svg {
height: auto;
max-width: 400px;
position: relative;
border: 1px solid red;
svg {
position: absolute;
width: 100%;
max-width: 400px;
height: auto;
}
}
HTML
<div class="pure-u-1" id="curve-svg">
<svg id="svg" width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.41421;">
<path id="curve" style="fill:none;stroke-width:0.35px;stroke:#333;" d="blah" blah blah/>
</svg>
</div>
I am utilizing PURE.css, but so far I haven't come across anything that would hinder the div from expanding to fit the content; this issue has also been observed with both Bootstrap 3 and Bootstrap 4.
Any assistance or recommendations would be greatly appreciated!