Is there a way to center an SVG both vertically and horizontally inside a div? The issue is that the width and height of the SVG are determined using the vx-responsive library, resulting in the following DOM structure:
https://i.sstatic.net/3p2wc.png
Edit: code has been added below
<div class="w-100 h-70 bg-yellow pa3 ba b--red flex flex-center center-vertical">
<div style="width: 100%; height: 100%">
<svg width="41.59375" height="25.208">
<rect x="0" y="0" width="41.59375" height="25.208" stroke="green"></rect>
</svg>
</div>
</div>
The current result is shown below:
https://i.sstatic.net/ffYZj.png
I am unable to remove the inner div
as it is necessary, but I cannot add any additional properties to it. What can be done to resolve this issue?