Recently, I have been exploring the Bootstrap framework and experimenting with grid alignment.
When working with 4 columns, W3 schools recommends using the following row setup:
<div class="row">
<div class="col-lg-3">
</div>
<div class="col-lg-3">
</div>
<div class="col-lg-3">
</div>
<div class="col-lg-3">
</div>
</div>
For two columns, it's suggested to divide them using col-lg-6 and col-lg-6. But what if you have 5 columns to align? What values should be set for col-lg-* in a 3-column layout?
- Additionally, how would one handle a scenario where data is fetched from a JSON file dynamically to create columns at runtime? Consider an example like the one below that utilizes AngularJS:
<section class="row">
<ul>
<li class="col-lg-6">
<img class="profile-image img-circle av" width="70%" src="images/Crack.png" />
<p>Some text</p>
</li>
<li class="col-lg-6">
<img class="profile-image img-circle av" width="70%" src="images/Aad.png" />
<p>Some text</p>
</li>
<li class="col-lg-6">
<img class="profile-image img-circle av" width="70%" src="images/Aa.png" />
<p>Some text</p>
</li>
</ul>
</section>
I am curious about how one could use ng-repeat to segregate columns accordingly based on dynamic JSON data. Any insights or suggestions would be greatly appreciated. Thank you for your help!