I need my images to have a text above with the description of each of them! I tried to touch the CSS positions and it works fine with 3 of the 4, in the fourth image everything falls apart, I don't know why :(
HTML:
<div class="helados container">
<div class="row">
<div class="col s12 l4">
<img th:src="@{/images/chocolate.png}" />
<a href="#"></a>
</div>
<div class="col s12 l4">
<img th:src="@{/images/crema.png}" />
<a href="#"></a>
</div>
<div class="col s12 l4">
<img th:src="@{/images/dulceDeLeche.png}" />
<a href="#"></a>
</div>
<div class="col s12 l4">
<img th:src="@{/images/frutales.png}" />
<a href="#"></a>
</div>
</div>
</div>
CSS:
.helados {
padding: 0 1.5rem;
}
.helados img {
width: 100%;
}
.container {
width: 100%;
}
.helados.container {
padding: 0;
}
.helados.container .col {
padding: 0 0.75rem !important;
}
What I want to do is that in each of the images (above them) a simple text appears that says CHOCOLATE, FRUIT TREES, DULCE DE LECHE and CREAMS so that it looks more beautiful for the user.
Thank you total :)
Here's an example that worked for me.
More information.
Greetings You must create or have your image inside a container, in this case a div, additionally the description can go inside a span, personal tag, div...etc... in this case I use a span:
To apply the styles I use this css code:
Result:
I hope it helps you...