I'm trying to make Materialize slider responsive using a CSS, but it's doesn't work properly. when I test my code with the adaptive view of Firefox, I get slider images responsive with a grey background much bigger than the height of the slider images(as you can see below).
.slider .slides li img {
background-size: 100% auto;;
background-repeat: no-repeat;
}
<div class="row">
<div class="slider " >
<ul class="slides ">
<li>
<img class="responsive-img" id="img" src="{{ asset('font/images/IMG_61.jpg') }}">
</li>
<li>
<img class="responsive-img" id="img" src="{{ asset('font/images/IMG_53.jpg') }}">
</li>
<li>
<img class="responsive-img" id="img" src="{{ asset('font/images/IMG_2.jpg') }}">
</li>
</ul>
</div>
</div>
Try this, works for me