Hello,
I added some css to put the title and price on top of the product images but it has applied to to the top edge. I would like it to be on the bottom left corner and not right on the edge. It also is only working on desktop, please help make it work on mobile too.
Thank you!
This is how it’s looking:
I would like it to look like this:
https://nuijewellery.com.au/collections/new-arrivals
Code added is:
@media only screen and (min-width: 768px) {
.card__content {
position: absolute;
}
.card-wrapper:hover .card__content .card__information {
background: transparent;
}
}
I want it on the Bottom left of the image I mean***!!!
Hi @jewellerystore1 ,
To position the title and price on the bottom left corner of the product images and ensure it works on both desktop and mobile, you can adjust the CSS as follows:
@media only screen and (min-width: 768px) {
.card__content {
position: absolute;
bottom: 0;
left: 0; /* Adjust to position on the bottom left /
padding: 10px; / Add padding for spacing */
}
.card-wrapper:hover .card__content .card__information {
background: transparent;
}
}
This code will position the title and price on the bottom left corner of the product images and provide spacing from the edge. It should also work on both desktop and mobile devices.
If that’s work for you. Please like this comment.
1 Like
Thank you so much! How can I add some spacing from the left edge? It’s still right against it now.
@jewellerystore1
@media only screen and (min-width: 768px) {
.card__content {
left: 5; // update that your own value
}
}
I added 5 but the position isn’t moving over?
@media only screen and (min-width: 768px) {
.card__content {
position: absolute;
bottom: 0;
left: 5; /* Adjust to position on the bottom left /
padding: 0px; / Add padding for spacing */
}
.card-wrapper:hover .card__content .card__information {
background: transparent;
}
}