Skip Navigation

[Resolved] How to make all slides the same height, based on the tallest slide

This support ticket is created 5 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by michaelW-23 5 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#1291167

Tell us what you are trying to do?
I have sliders which display a variable amount of text. This causes the content below it to jump up and down the page, depending on which slide is displayed. In Drupal, I can set the slider to dynamically check the height of the tallest slide and then display all slides at the same height.
Is there a jquery way of doing this?

You can see an example here:
hidden link

In this example, I've made the pagination dots display vertically using css, but this is not an essential feature and I'm looking for a generic solution to the slider height problem.

#1291595

Hi Michael,

Thank you for contacting us and I'd be happy to assist.

Since the contents of the next slides are dynamically loaded through AJAX, detection, and manipulation of height through jQuery/script becomes challenging and it can also negatively affect the performance/page loading.

A simple workaround for avoiding the jump of content below the slider can be to use some custom CSS, to apply a min-height value to the slider's wrapping container ( i.e div with ID "slide-container-mw").

Example:


/* for screens wider than 767px */
@media only screen and (min-width: 768px) {
#slide-container-mw {
    min-height: 230px;
}
}

/* for screens narrower than 768px */
@media only screen and (max-width: 767px) {
#slide-container-mw {
    min-height: 560px;
}
}

I hope this helps and for more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

regards,
Waqar

#1298427

Thank you Waqar. I agree this is the easiest solution.