I've been working on a checkout calculator using JavaScript, and here's how I'm inputting the data:
<p class="car-rent-class-info h6 pb-1"></p>
<p class="car-rent-pickupdropoff-info h6 pb-1"></p>
<p class="car-rent-coverage-info h6 pb-1"></p>
<p class="car-rent-age-info h6 pb-1"></p>
<p class="car-rent-dropfee-info h6 pb-1"></p>
<p class="car-rent-adddriver-info h6 pb-1"></p>
<p class="car-rent-roadside-info h6 pb-1"></p>
<p class="car-rent-afterhours-info h6 pb-1"></p>
<p class="car-rent-tax-info h6 pb-1">Tax Included</p>
<h2 class="car-rent-price-total h1 t600"></h2>
Here is my script:
carpricetotal = $( ".car-rent-price-total" );
carpricetotal.html("$"+generateBillMath(DaysBetween(start_date,end_date),dayprice, weeklyprice, monthlyprice, car_class, pickup_loc, dropoff_loc, coveragec));
The problem I'm facing is that when not all fields are filled, there can be unsightly gaps as shown in this screenshot:
https://i.stack.imgur.com/l8aRt.png
Any suggestions on how to avoid this uneven vertical spacing?