Just a quick query! I'm attempting to adjust the css width property through JavaScript in this manner:
document.getElementById("progressvalue").style.width = "80%";
.progress {
width: 100%;
max-width: 500px;
border: 3px solid black;
height: 20px;
padding: 1px;
}
#progressvalue {
height: 100%;
width: 0%;
background-color: #05e35e;
}
<div class="progress">
<div id="progressvalue"></div>
</div>
Rather than setting it to 80% in the JavaScript code, I would like to increase the width by 20%. In other words, (width = width + 20%). I want to apply this adjustment only once (so I can reuse it under different conditions), hence the need for this approach (width = width + 20%)