So my problem here is that I have a slick-carousel installed, and I'm using it to display products in a slider-type of way. After installing it I saw that the images have a big padding on the right side, and that it's all the way up to the image of the next product. So then I went into my code because I thought it's a padding/ margin problem. I deleted all the margins and paddings I had but that didn't change anything. What I'm trying to do is just have the images without the space in between so I can add my own padding on both sides. Here is the HTML/Shopify Liquid code I'm using:
{%- assign collection = collections[section.settings.collection]-%}
<div class="collection-title_wrapper">
<h1>{{ collection.title }}</h1>
</div>
{%- if collection.description != blank -%}
<p>{{ collection.description }}</p>
{%- endif -%}
<div data-slick='{"slidesToShow": 3}' class="feature-grid-collection collection-slider">
{% for product in collection.products %}
<div class="grid-product">
<div class="collection-slider-images">
<a href="{{ product.url }}">
<div class="collection-slider-image_wrapper">
<img src="{{ product.featured_image.src | img_url: '400x' }}"
alt="{{ product.featured_image.alt | escape }}">
</div>
</a>
</div>
{% unless product.available %}<br><strong>sold out</strong>{% endunless %}
</div>
{% endfor %}
</div>
{% schema %}
{
"name": "Product Collection",
"settings": [
{
"type": "collection",
"id": "collection",
"label": "Your Collection"
}
],
"presets": [
{
"name": "Product Slider",
"category": "Product Display"
}
]
}
{% endschema %}
Here is the CSS:
.collection-slider {
.slick-track {
display: flex;
width: 100%;
}
.slick-prev {
left: 0;
z-index: 999;
}
.slick-next {
right: 0;
z-index: 999;
}
overflow: hidden;
width: 100%;
padding: 0;
margin: 0;
display: inline-block;
}
.grid-product {
display: grid;
justify-content: center;
color: white;
line-height: 1;
border-radius: 5px;
}
And here is what google inspect is showing:
The link to my website is kuduzovic.myshopify.com and the password is soltew if anyone else wants to check the google inspect for themselves, and see if they can find anything.
EDIT: Here I'm adding some more information because it looks like I was unclear on what my problem is which I apologize for. So I have a collection, and without slick the images look normal and everything works fine. But once I add slick to the section, the images get a random margin/padding only on the right side, which I'm trying to get rid of. And once you click that margin it's the same as if you clicked on the actual image.
Here are some images on how it looks without and with slick added.
-Without slick:
-With slick: