Is there a more efficient method for aligning elements using Bootstrap?
Here is my current approach:
<div className="row">
<div className="col-3 font-weight-bold">
Item Name
</div>
<div className="col-3 font-weight-bold">
# of Item
</div>
<div className="col-3 font-weight-bold">
Total
</div>
</div>
<div className="row">
<div className="col-3 font-weight-bold">
Total Cost
</div>
<div className="col-3 font-weight-bold">
</div>
<div className="col-3 font-weight-bold">
${this.state.total.toLocaleString()}
</div>
</div>
For the second set of elements in my row
, I created an empty div
with the class col-3 font-weight-bold
. This was done to ensure that my Total Cost
and
${this.state.total.toLocaleString()}
align properly with Item Name
and Total
.
While this practice works for my personal project, I'm concerned that it may not meet the standards for a professional code review. Are there better techniques available for aligning columns when skipping certain ones?