Html element + slideToggle() make me nervous!

Hey CSS gurus,

I’ve an html element working as the main page of my app. In this HTML element, several blocks. Among them, a card with a button. The button is linked to a JS slideToggle() action to reveal some hidden text.

We’ll, it works fine the toggle toggles. But, problem : when the slide up occurs, I get a blz’k area at the bottom of the page, it’s height is the height of the hidden text div.

I tried lot of things I found, using css magic or Javascript, including to not hide the text at page load, then when the dom ready event triggers, I set the height of the hidden block and I call a slide up to get it hidden. But… Still the blank area at the bottom.

The shrink to fit heckbox does not help.

Guys, I’m nervous, I need a beer, could / would you share THE tips that would help in getting this blank space out for ever?!

Note : several block with hidden text, but each text is different, so I can’t set a fixed height for the div in css style…

This topic was automatically closed after 70 days. New replies are no longer allowed.