I have an SVG
But come to find out it isnt responsive
Heres how my SVG starts
<div id="floor-plan">
<svg xmlns="http://www.w3.org/2000/svg" style="width:100%; height:400px">
I thought that would do the trick, how do I make it responsive?
the background image is the div (which seems responsive, but the SVG doesn’t resize with it.
SVGs are very similar to images, they expand to the parent container unless they are allocated fixed dimensions.
The SVG has a style with fixed dimensions.
Try removing the style, replace with viewbox=“x1 y1 x2 y2” and experiment with the x1, y1, x2 and y2 dimensions.
1 Like
system
Closed
December 21, 2019, 10:41am
3
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.