I'm trying to make an SVG responsive in the x-axis but I don't want it to scale with the window. In fact, I would like to make it keep the same aspect ratio, the same height, and also fill the same parent div, so it would be a zoom in the view box in the center of the width axis.
I'm currently playing around with the view box and I have
(for WinWidth < SvgWidth && WinWidth > SvgWidth/ 2) , deltaWidth = SvgWidth - WinWidth
viewbox = ((deltaWidth / 2) 0 (SvgWidth - deltaWidth) SvgHeight)
But this is not working as there are still blank spaces on top and bottom of the parent div. Can you please explain to me what am I getting wrong? I suppose it's because the ratio between width and height is no longer the same but i dont find how to arrange that. Thanks in advance
