I need help arranging an icon with a number on top in the left corner of a div container, alongside an image to the right. While it displays correctly on desktop, the mobile view overlaps the image on the right and the text on the left.
Here is a snippet of the HTML code:
<div class="col-1">
<div class="wrap-image">
<a
th:rowNumber="${status.count}" th:href="@{'/basket/remove/' + ${product.id}}">
<img src="images/bin.png" height="60">
<span z-index: 10;>[[${status.count}]]</span>
</a>
</div>
</div>
<div class="col-3">
<img th:src="@{${product.mainImagePath}}" class="img-fluid" />
</div>
This is the CSS style used:
.wrap-image {
position: relative;
width: min-content;
}
.wrap-image span {
position: absolute;
top: 1px;
left: 20px;
}
View the device issue here: device
Another device view: device2
Compare with PC view: desktop
The overlap might be due to incorrect sizing of the main image for mobile devices. Unsure how to adjust this properly.