Slick: Slide height percentage of parent e.g. 100%

Created on 20 Nov 2015  路  6Comments  路  Source: kenwheeler/slick

Hi,

Sorry couldn't find any other issues relating to this. Great plugin BTW.

What is the correct way to have 100% height on slides? The parent container has a height that is a relative and the slide is relative to the container e.g. 100%

Slick adds many internal elements between the parent and the slides so the slide is no longer relative to the parent. Without hacking a height onto the slide or having knowledge of the internal workings of Slick and the additional containers it produces, what is the best way around this issue?

I was having the same issue with slides that had no content, only background images that covered the area - this was to be used as a non-interactive enhancement piece in the background of another slide, but I couldn't get it working with 100% height so had to use another technique.

Thanks,
Jarrod

Most helpful comment

works great for me with this additional css:

.slick-list,
.slick-track {
    height: 100%;
}

All 6 comments

Closing due to not following CONTRIBUTING.md

works great for me with this additional css:

.slick-list,
.slick-track {
    height: 100%;
}

I tried the above solution and didn't work, but this does work!

.slick-track {
  display: flex;
}
.slick-track .slick-slide {
  display: flex;
  height: auto;
}

I tried the above solution and didn't work, but this does work!

.slick-track {
  display: flex;
}
.slick-track .slick-slide {
  display: flex;
  height: auto;
}

Wow so glad that I found this!
Thanks!

.slick-track {
  display: flex;
}
.slick-track .slick-slide {
  display: flex;
  height: auto;
}

thanks

If anyone is experiencing weird slick height (very tall), the following should work (the other solutions weren't what I was looking for):

.slick-slide{
    height: auto;
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

barzev picture barzev  路  3Comments

Libig picture Libig  路  3Comments

VladPoe picture VladPoe  路  3Comments

REPTILEHAUS picture REPTILEHAUS  路  3Comments

stephane-r picture stephane-r  路  3Comments