Home >Web Front-end >CSS Tutorial >How do I create multi-row columns in Bootstrap 3 and Bootstrap 4?
Multi-Row Bootstrap Columns
Problem:
Creating a Bootstrap grid where a specific column spans multiple rows, particularly when boxes are generated programmatically in sequence.
Solution:
Bootstrap 3:
Bootstrap 4:
Example Code:
Bootstrap 3:
<div class="row"> <div class="col-md-4"> <div class="well">1 <br> <br> <br> <br> <br> </div> </div> <div class="col-md-8"> <div class="row"> <div class="col-md-6"> <div class="well">2</div> </div> <div class="col-md-6"> <div class="well">3</div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="well">4</div> </div> <div class="col-md-6"> <div class="well">5</div> </div> </div> </div> </div><p><strong>Bootstrap 4:</strong></p> <pre class="brush:php;toolbar:false"><div class="container"> <div class="row"> <div class="col"> <div class="well">1 <br> <br> <br> <br> <br> </div> </div> <div class="row w-100"> <div class="col"> <div class="well">2</div> </div> <div class="col"> <div class="well">3</div> </div> </div> <div class="row w-100"> <div class="col"> <div class="well">4</div> </div> <div class="col"> <div class="well">5</div> </div> </div> </div> </div>
The above is the detailed content of How do I create multi-row columns in Bootstrap 3 and Bootstrap 4?. For more information, please follow other related articles on the PHP Chinese website!