Am trying to add a line break between "Calculate" button & result of a Javascript calculator- https://www.gadgetronicx.com/battery-life-calculator/. I am not much aware of web programming. I got help from stackoverflow community to build this calculator. This is how the results are showing up in the webpage
Here is the code
const bcForm = document.getElementById('battery-calculator')
bcForm.onsubmit=e=>
{
e.preventDefault()
let time = (Number(bcForm.currunit.value) *bcForm.battcurr.valueAsNumber )
/ (Number(bcForm.loadunit.value) *bcForm.loadcurr.valueAsNumber )
let time1= (Number(bcForm.loadunit.value) *bcForm.loadcurr.valueAsNumber )
/ (Number(bcForm.currunit.value) *bcForm.battcurr.valueAsNumber )
var unit, multiplier
if(Number(bcForm.loadunit.value)==1)
{
unit="A"
}
else
{
unit="mA"
}
let dischargerate=Number(bcForm.Battype.value)*bcForm.battcurr.value
bcForm.timeResult.value = "1) Load can be powered for " + time.toFixed(2)+" hours"
bcForm.time1Result.value = "2) Rate of battery discharge " + time1.toFixed(2)+" C"
bcForm.dischargerate.value = "3) Maximum recommended discharge rate " + dischargerate.toFixed(2)+" "+ unit + " for optimum battery performance"
}
#battery-calculator fieldset,#battery-calculator label,#battery-calculator input,#battery-calculator select,#battery-calculator output,#battery-calculator button {
border-radius: 4px;display: block !important ;float: left !important;margin: .3em !important;width:auto !important;margin-top:1em !important;}
#battery-calculator label,#battery-calculator button {clear: both !important;width:15em !important;}
#battery-calculator label {line-height: 2em !important;overflow: hidden !important;white-space: nowrap !important;font-weight:bold;}
#battery-calculator label::after {content: ' . . . . . . . . . . . . . . . . . . . '}
#battery-calculator button { background-color: #4CAF50; border: none;color: white;padding: 15px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;}
#battery-calculator button:hover {box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);}
#battery-calculator output {margin: 2em 2em .4em 1em !important;}
<form id="battery-calculator">
<fieldset>
<label>Load current</label>
<input type="number" name="loadcurr" value="0" min="0" >
<select name="currunit">
<option value="1" select > A </option>
<option value="1000" > mA </option>
</select>
<br/>
<label>Battery maximum capacity</label>
<input type="number" name="battcurr" value="0" min="0" >
<select name="loadunit">
<option value="1" select > Ah </option>
<option value="1000" > mAh </option>
</select>
<br/>
<label>Type of battery</label>
<select name="Battype">
<option value="1" > NiCd </option>
<option value="0.5"> NiMH </option>
<option value="0.2"> Lead Acid </option>
<option value="1"> Li-ion </option>
<option value="1"> Li-ion Polymer </option>
<option value="NA"> Others </option>
</select>
<button type="submit">Calculate</button>
<br/>
<output name="timeResult"></output>
<br/>
<output name="time1Result"></output>
<br/>
<output name="dischargerate"></output>
</fieldset>
</form>
I have tried adding line break to the form and also tried writing it using Javascript as well but it didn't work. Am quite clueless now. Any help or lead will be much appreciated.