this is a code I have for a Wh to mAh calculator, works great exactly how I want it but it’s blocking all the other elements on my webflow page please help!!1
Convert Watt hours to mAh
<div>
<span>Insert Watts-hour (Wh) and voltage (V) and click on Calculate to obtain milliamp-hours (mAh).</span>
</div>
<div>
<div class="divinput">
<input id="watts2" name="Wh" size="8"> <span class="units">Wh</span>
</div>
<div class="divinput">
<input id="volts2" name="V" size="8"> <span class="units">V</span>
</div>
<div class="divinput">
<input onclick="convert2()" type="submit" value="Calculate">
</div>
<div class="divinput">
<input id="mAh2" name="mAh" size="8"> <span class="units">mAh</span>
</div>
</div>
<div>
<span>1 kilowatt hour = 1000 watt hour, therefore the formula is (Wh)*1000/(V) =(mAh).</span> <span>For example, if you have a 1.5Wh battery rated at 5V, the power is 1.5Wh * 1000 / 5V = 300mAh. The battery rating will determine how many batteries are needed once the mAh is calculated.</span>
</div>
function convert() {
a = document.getElementById("mAh").value,
b = document.getElementById("volts").value,
c = a * b / 1e3,
document.getElementById("watts").value = c
}
function convert2() {
a = document.getElementById("watts2").value,
b = document.getElementById("volts2").value,
c = 1e3 * a / b,
document.getElementById("mAh2").value = c
}