Slider : Auto-adjust the height of each slide

Hello @Everyone

I wondered if anyone found out a custom code to adjust the slider height according to each slide dynamically.

Right now, when the height of the slider / mask is auto, it applies the height of the tallest slide. Which is logical.

What I want is to get rid of the unused space for slides that have a smaller height, without getting rid of the auto.

Why? Because I still need the slider and the mask to be in auto as I have dropdowns in one of my slide (thus when the dropdown is open, thanks to the auto, it enlarges the height of the slider to fit when the dropdowns are open).

As I must have this auto on the whole slider/mask, I need a custom code that gets rid of the unused height for other slides while keeping the auto for the slide that has the dropdowns.

I hope this is not asking too much…

Thanks in advance for your suggestions!

The way the slider component was created I don’t think there will be a viable solution for this. It is a fabulous component, but built for solid uniformity and a bunch of great interactions and adaptability for responsive layouts.

The tabs component does work and dynamically scales to fit content. If you don’t have to have auto playback slider functionality and relative forward and back nav then that would be the best component option.

Optionally for a small slider type setup you could build close to the type of functionality you are looking for from scratch using IX. It would be a huge task to work out timing for auto-play, but relative nav and expanding content are very doable especially for a small 3-5 frame slider. If you use a side scroll slider or want vertical scrolling slider let me know - I have an example using IX.

Hello @vlogic

You’re probably right. The idea of using tabs instead of slider sounds a good alternative, but I’ll miss the slide-left/right animations and other nice features of Webflow’s Slider widget.

I’m still trying to figure out if I can inject some custom script to “get the rendered width” and then remove the unnecessary space.

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