Struggling to make SVG data charts responsive due to the 'position:fixed' CSS attribute applied, I'm exploring alternative solutions that don't involve media queries. Ideally, I want the SVG to scale up and down while remaining centered regardless of browser size.
If a non-media query solution isn't possible, any suggestions on how to ensure all data stays aligned with the SVG when resizing the browser would be appreciated!
Check out one of the SVGs I'm working on for responsiveness (on the right hand side) here.
I've provided an example showcasing the issue in a codepen with just one percentage displayed on the SVG here.
<div id="Backup-3"></div>
<p id="percentage" class="backup3-percentage">3%</p>
#Backup-3 {
position: fixed;
width: 550px;
margin-left: 73px;
margin-top: 31px;
}
.backup3-percentage {
position: fixed;
color: #000;
margin-left: 478px;
margin-top: 96px;
font-size: 1em;
transform: rotate(6deg);
}