Streaming live at 10am (PST)

Slider: Fluid height or vertical-align middle


#1

Hi guys!

Is there a cheap, quick way to make the slider height follow it`s content? If not, is it simple to make it's contents align vertically on the middle of the slide? If both these solutions aren't possible I'll have to create a new slider for the website and remove webflow's...

Thanks!


#2

1) Have the slider be placed on Auto and remove the minimum width to have it follow the height of the content.

2) Place a div inside of the slider, align the text in the center, then place the content inside of the div.

Hope this helps. :sunglasses:


#3

Hello, @GuiHarrison.

By default, the slider with height: AUTO will get the height of the BIGGEST image/content from what it has. There is no easy way to make slider change its height with EVERY SLIDE.

Add div with fixed height inside the slide (do not change slide settings). Then there is 2 ways:

1) Make div display: flex and use flex settings for elements inside the div for vertical aligning
2) Make div position absolute with aligning: top=50% and transform: move up=50%. In this case div can have height: auto, but slider has to have some height.

Regards,
Anna


#4

Thanks for the quick response guys!

sabanna I used your second solution for quick fix. Thanks!


#5

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.