Why height of vertical slick slider increasing automaticlly stacloberflow
Answers
Answered by
0
Hey,
I've been using Slick for a year or so on various projects, and it is truly amazing! However I've hit a bit of a problem on a vertical carousel.
It's a leaderboard showing scores - I need to show six at a time out of about 30, hence vertical is the way I need to go, although it's the first time I've used this setting.
The problem I've got is responsive - on large desktop each item starts out as 60px height each, dictated by a square image, but with text on one line, so the overall height of the container is 360px (6x60). The elements don't have a fixed height, it's the image the makes it 60px.
But when I scale down to mobile, and the text starts to wrap onto two lines making each item taller than 60px, the carousel doesn't resize - it stays at 360px, with that height measurement being applied by the plugin.
It's as if there needs to be a 'variableHeight' setting, similar to the variableWidth setting for horizontal carousels.
I've been using Slick for a year or so on various projects, and it is truly amazing! However I've hit a bit of a problem on a vertical carousel.
It's a leaderboard showing scores - I need to show six at a time out of about 30, hence vertical is the way I need to go, although it's the first time I've used this setting.
The problem I've got is responsive - on large desktop each item starts out as 60px height each, dictated by a square image, but with text on one line, so the overall height of the container is 360px (6x60). The elements don't have a fixed height, it's the image the makes it 60px.
But when I scale down to mobile, and the text starts to wrap onto two lines making each item taller than 60px, the carousel doesn't resize - it stays at 360px, with that height measurement being applied by the plugin.
It's as if there needs to be a 'variableHeight' setting, similar to the variableWidth setting for horizontal carousels.
Similar questions