I'm really close to getting this accomplished. I'm trying to get 3 images across each row. The first row only has 1 image, though, then the rest have 3 across. I'm not sure why the first row has only 1 image. Here's my code:
<div class="row">
@{ var counter = 0; }
@foreach (var x in portifolioImages)
{
<div class="col-sm-4">
<a href="#"><img src="@x.UmbracoFile" alt="@x.imageTitle" style="margin:0 auto;" />
<p class="folioTitle">@x.imageClient <br /><span style="color:#00bfff; font-weight: bold; text-transform: uppercase; font-size:15px;">Learn More</span></p>
</a>
</div>
if (counter % 3 == 0)
{
@:</div><div class="row">
counter = 0;
}
counter++;
}
</div>
col-*-4means33.3% widthmeans each row divides equally into 3 so simple<div class="row"> foreach { <div class="col-sm-4"> images </div> } endforeach</div>should do the job