Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8838165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:55:15+00:00 2026-06-14T09:55:15+00:00

So i have a slideshow block(its responsive) and i have set min-height: 315px for

  • 0

So i have a slideshow block(its responsive) and i have set min-height: 315px for this block, i really need it, but when i resize window i need to reduce min-height smoothly, right now i wrote jQuery code, so its working, but its ugly tbh.

function minHeightBehavior(width) {
        width = parseInt(width);
        element = $('#block-views-home-page-slider-block');
        sliderHeight = $('.views-field-slider').height();
        element.css('min-height', '315px');
        if (width >= 769 && width < 960) {
            console.log(sliderHeight);
            element.css('min-height', sliderHeight +'px');

        }

    }

right now blocks below the slider, is jumping up, its because for example when window screen width is 900, element height is 300 and if screen width is 899, element height is 300 too. After that if screen width is 898, element height is 299, etc.
Maybe there is a better solution out there?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:55:16+00:00Added an answer on June 14, 2026 at 9:55 am

    Use the .animate method.

    (and start using var for local variables)

    function minHeightBehavior(width) {
            var width = parseInt(width),
                element = $('#block-views-home-page-slider-block'),
                sliderHeight = $('.views-field-slider').height(),
                minHeight = 315;
    
            if (width >= 769 && width < 960) {
                minHeight = sliderHeight;
            }
    
            element.animate({height: minHeight + 'px'}, 500, function(){
               $(this).css({'min-height': minHeight + 'px', 'height':'auto'});
            });
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this slideshow that I'm trying to simply move up, but I can't
I have a slideshow set up with Magic fields like the code below, but
ok, so i have this slideshow.html containing just a bunch of pictures, and the
I have to show slideshow of images. But at one moment I know only
I have this AS3 slideshow code, that loads an XML with a list of
I have searched this forum and the internet for an answer to this but
I have used jquery slideshow to rotate background images. But what my requirement is,
I have thought that: $('#slideshow_body').html(newContent); would be equivalent to this: document.getElementById('slideshow_body').innerHTML=newContent; But it is
I have slideshow, and I want to show Big images, I added to [NSOperation
I have a slideshow built in flash that I want to mimic in jQuery.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.