Kiwi
March 12, 2024, 9:52pm
1
Hi everyone - just wondering if you know how to adjust a custom collection to remove the padding. I want my image to be right to the edge of the collection item border like the attached screenshot.
I tried to use custom CSS class to change the image component but the padding is controlled with the custom collection component and I don’t know how to use CSS class to adjust the padding on custom collection.
Here’s my best attempt. I haven’t found out what setting is causing the bottom border of the image to have a radius.
The setup is like this. Image > Aspect ratio = Auto, Size = Full.
Custom collection’s class name = “items”.
.items div[class*="max-size-2xl"] > div:first-child {
margin-top: 0px;
}
.items div[class*="max-size-2xl"] > div:first-child div {
--container-x-pad: 0px;
}
3 Likes
Kiwi
March 13, 2024, 12:27am
3
This is great thank you! I will try it
1 Like
Kiwi
March 24, 2024, 8:40pm
4
I acheived the bottom flat radius by inserting a seperator and just making it into a thick white line using a border and removing the padding. Looks fab!
.white-line
{
border-width: 10px;
border-color: #ffffff;
margin-top: -12px;
}
3 Likes
Is this what you are looking for?
.items div[class*="max-size-2xl"] > div:first-child {
margin-top: 0px;border-radius: 0px;
}
.items div[class*="max-size-2xl"] > div:first-child div {
--container-x-pad: 0px;
border-radius: 12px 12px 0 0;
}
.items .image-style-rectilinear, .items .aspect-container img {
border-radius: 12px 12px 0 0;
}
3 Likes
Looks like it does the trick. Can we make that image a bit bigger?
The image here follows the aspect ratio of the source. If the image is a portrait it will be taller. Do you mean fixed size?
Yeah, I just thought it’s a bit far from “CSS Stylist” for my liking.
Kiwi
March 25, 2024, 12:10am
9
Amazing thank you! Looks fabulous
1 Like
.items div[class*="max-size-2xl"] > div:first-child {
margin-top: 0px;border-radius: 0px;
}
.items div[class*="max-size-2xl"] > div:first-child div {
--container-x-pad: 0px;
border-radius: 12px 12px 0 0;
}
.items .aspect-container img {
border-radius: 12px 12px 0 0;
height: 250px;
}
3 Likes
system
Closed
April 1, 2024, 12:10am
11
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.