While working on a template with nested rows and columns in Bootstrap, the layout ended up looking like this:
<div class="col-5">
<div class="row">
<div class="col-3 border border-secondary">Truck Number</div>
<div class="col-4 border border-secondary">Trailer Number</div>
<div class="col-5 border border-secondary">Seal Number(s)</div>
</div>
<div class="row">
<div class="col-6 border border-secondary">Date:</div>
<div class="col-6 border border-secondary">Time:</div>
</div>
<div class="row">
<div class="col-6 border border-secondary">Customer Job No.:</div>
<div class="col-6 border border-secondary">Customer P/O No.:</div>
</div>
</div>
In order to make the rows stretch to the full height of the column, I attempted to use a flex display on the parent column. However, this caused all the rows to appear in a single line instead of stacked as intended. Please see the highlighted problem area in my code snippet below:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<div class="billOfLadingContainer" id="element-to-print" style="background-color: white;">
<div class="text-center">TEMPLATE MAIN</div>
<div class="row">
<div class="col-7 text-center" style="background-color: black;color: white;">SCHOOL</div>
<div class="col-5">
<div class="row">
<div class="col-3 border border-secondary">SCHOOL</div>
<div class="col-4 border border-secondary">Ta</div>
<div class="col-5 border border-secondary">CD</div>
</div>
</div>
<div class="col-4" style="border:1px solid black;">
<div class="row">
<div class="col-6">
<img class="logo" src="img/logo.jpg">
</div>
<div class="col-6">
<div>ADDRE1 </div>
<div>ADDRE1 SD 287522</div>
<div>ADDRE1 SD 287522</div>
<div>ADDRE1 SD 287522</div>
</div>
</div>
</div>
<div class="col-3">
<div class="row border border-secondary" style="height: 100%;">
<div>Condition</div>
<div>Sunday:______________</div>
<div>Saturday:______________</div>
<div>Monday:______________</div>
</div>
</div>
<div class="col-5">
<div class="row">
<div class="col-3 border border-secondary">Bus Number</div>
<div class="col-4 border border-secondary">Bus 2 Number</div>
<div class="col-5 border border-secondary">Seal3 Number(s)</div>
</div>
<div class="row">
<div class="col-6 border border-secondary">Date:</div>
<div class="col-6 border border-secondary">Time:</div>
</div>
<div class="row">
<div class="col-6 border border-secondary">School No.:</div>
<div class="col-6 border border-secondary">School P/O No.:</div>
</div>
<div class="row" style="background:red">
<div class="col-6 border border-secondary">Remove this space</div>
</div>
</div>
</div>