I am creating columns dynamically using Bootstrap. I have a for loop that creates the following columns:
<div class="col-md-6 col-xs-12 inspection-category-col">
<div class="media inspection-category">
<div class="media-left">
<a href="#">
<img src="http://placehold.it/100x100">
</a>
</div>
<div class="media-body inspection-category-media-body">
<h3 class="media-heading inspection-category-media-heading">{{ item.title }}</h3>
<span class="inspection-category-media-content">
{{ item.description }}
</span>
</div>
</div>
</div>
I want to add a border-bottom between each column, but since I don't know the number of columns I need to handle the following logic:
if screen md/lg && count(cols) > 2 && not last one or two cols
add border-bottom
else if screen xs && not last col
add border bottom
else
do nothing
I'm not sure the best way to handle this. Ideally through CSS, but I'm not sure how. Thanks in advance.