Reputation: 31
I use slick.js carousel and I simplify css a little bit to fix that error but I think the problem is from javascript.
If I add to .slick-slide
height in pixels, works. But if I want to use percentage, slider get auto-height. Form where, I really don't know. I try to put height: 100% !important;
add classes with height, remove, but nothing work.
Here is CodePen exemple
Upvotes: 2
Views: 1163
Reputation: 2309
For height to work in percentages, you need to set height for all parent divs. Check this out: http://codepen.io/anon/pen/LVjadW
html, body, #myCarousel, #myCarousel div{
height:100%;
}
#myCarousel .slick-slide {
height: 50%;
float: left;
}
Upvotes: 1