html – Bootstrap make all columns equal to largest col-auto width

0
88
html - Animation after toggling doesn't apply the second style


I am using Bootstrap’s grid system. My grid has multiple rows where the first column is set to col-auto to wrap its content (different lengths). Is there a way to make the width of the first column of each row equal to the largest width required by that column?

For example, if I have:

<div class="container-fluid">
   <div class="row">
      <div class="col-auto">short col</div>
      <div class="col">other stuff</div>
   </div>
   <div class="row">
      <div class="col-auto">clearly the longest column</div>
      <div class="col">other stuff</div>
   </div>
   <div class="row">
      <div class="col-auto">medium column</div>
      <div class="col">other stuff</div>
   </div>   
</div>

I would want all the columns with class col-auto to be the length of the longest column.



Source link

Leave a reply

Please enter your comment!
Please enter your name here