Setting fixed height for testimonials

Hi,

Is it possible to set a fixed height for the testimonials widget? Currently the page jumps around in the testimonials section when testimonials have different heights, which isn’t ideal. I have seen some earlier topics asking a similar question and saw a suggestion to add the following to Additional CSS, but it didn’t work:

.testimonials-area {
min-height: 245px;
}

Many thanks in advance!

Iain

Hi Iain,

Thank you for contacting us about our theme Sydney. I am happy to help out.

I request you to try these steps:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box
    jQuery(function($) {

      $(window).on('load resize', function() {

        var testiItem = $('.roll-testimonials .customer');
        var maxHeight = -1;

        testiItem.each(function() {
          maxHeight = maxHeight > $(this).height() ? maxHeight : $(this).height();
        });

        testiItem.each(function() {
          $('.roll-testimonials .owl-wrapper-outer').height(maxHeight);
          $(this).height(maxHeight);
        });

      });

    });
  1. Update

If this doesn’t give any change, you may need to flush the applied cache first. Then reload your page.

Let me know how it goes.

Stay safe.
Have an excellent day :slight_smile:

Regards,
Kharis
aThemes Support

Hi Kharis!

Wow, that’s amazing. It seems to have worked perfectly and looks loads better.

Thank you so much for your help!

Iain

You’re welcome Iain!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis
aThemes Support