I attempted to utilize the Lightslider plugin in order to craft a responsive slider for showcasing my portfolio images.
However, I encountered an issue where the height of each thumbnail in the portfolio appears to be cropped from both the top and bottom edges.
Below is my code snippet:
$('#responsive').lightSlider({
item: 4,
loop: false,
slideMove: 2,
easing: 'cubic-bezier(0.25, 0, 0.25, 1)',
speed: 600,
pager: false,
slideMargin: 20,
responsive: [
{
breakpoint: 800,
settings: {
item: 3,
slideMove: 1,
slideMargin: 6,
}
},
{
breakpoint: 480,
settings: {
item: 2,
slideMove: 1,
}
}
]
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lightslider/1.1.6/js/lightslider.min.js"></script>
<div class="item">
<ul id="responsive" class="content-slider">
<?php for($i=1; $i<7; $i++){ ?>
<li>
<img src="https://assets.materialup.com/uploads/82eae29e-33b7-4ff7-be10-df432402b2b6/preview" style="width: 40%"/>
</li>
<?php } ?>
</ul>
</div>
This is the current output I am getting: https://i.sstatic.net/COVYI.jpg