lpmagnetic
New Member
I want an SVG to be a 4:1 width:height size, with the absolute size changing according to browser window size. I need the aspect ratio of the coordinate space within the SVG to be 1:1.The following achieves exactly what I want in Firefox, showing a blue SVG background with 4:1 ratio (eg. 1000 x 250px, depending on window size). However, in Chrome, the ratio is not observed and the SVG/visible background is eg. 1000 x 570px. \[code\]<body> <div id="svgdiv" style="background:AliceBlue; max-Width:100%"> <svg preserveAspectRatio="xMinYMin meet" viewBox="0 0 100 25"> </svg> </div></body>\[/code\]Is this a bug in Chrome, or have I misunderstood the usage? How can I obtain what I want in Chrome?