I am attempting to create a design similar to the one shown in the image below:
However, I am encountering difficulties because it needs to be generated within a foreach loop.
Currently, my code looks like this but does not resemble the desired image. I am unsure how to achieve the desired result:
@{
int counter = 1;
@foreach (IconsViewModel item in Model.AllIconsModel)
{
<a href="#" class="box"></a>
<p>@(counter++)</p>
}
}
CSS:
.box
{
border: 1px solid black;
width: 65px;
height: 65px;
float: left;
}
I would greatly appreciate any assistance in resolving this issue.