I am trying to create something like this:

But I have problems beacuse it has to be made inside a foreach loop.
This is how I have it right now but it aint like the image I dont know how to do it like my image.
@{
int counter = 1;
@foreach (IconsViewModel items in Model.AllIconsModel)
{
<a href="#" class="box"></a>
<p>@(counter++)</p>
}
}
CSS:
.box
{
border: 1px solid black;
width: 65px;
height: 65px;
float: left;
}
I will be very thankful if somone would help me.
You have to define html like this:
HTML
CSS
JS