Title: Responsive height
Last modified: October 23, 2019

---

# Responsive height

 *  Resolved [dimizu](https://wordpress.org/support/users/dimizu/)
 * (@dimizu)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/responsive-height-9/)
 * I use the Slider with an pixel height. On Desktop I need 780px, on tablet 600px,
   on smartphone 400px. I solved this with a javascript hack.
 *     ```
       setGutenslider();
       window.addEventListener("resize", setGutenslider);
   
       function setGutenslider() {
   
       	var hoehe;
   
       	if ($(window).width() <= 768) {
       		hoehe = "400px";
       	} else {
       		if ($(window).width() <= 992) {
       			hoehe = "600px";
       		} else {
       			hoehe = "780px";
       		}
       	}
   
       	var sliders = document.querySelectorAll('.wp-block-eedee-block-gutenslider');
       	sliders.forEach(function (el) {
   
       		el.style.setProperty('--gutenslider-min-height', hoehe);
   
       		var bodyStyles = window.getComputedStyle(el);
       		var fooBar = bodyStyles.getPropertyValue('--gutenslider-min-height');
   
       	})
       }	
       ```
   
 * This works for me.
 * But perhaps you would plan in a future version a better solution e.g. with different
   inputs für small, medium and large screens or an other solution that solves the
   problem with height for different devices/screens.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [eedee](https://wordpress.org/support/users/eedee/)
 * (@eedee)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/responsive-height-9/#post-12056933)
 * Hey [@dimizu](https://wordpress.org/support/users/dimizu/),
 * we totally agree and we are working on it. This and other features will be part
   of our version 3.0.0 release which will come this year.
 * Thank you for sharing your code, so others can profit from it until the plugin
   is not updated.
 * Best,
 * Niklas
 *  Plugin Author [eedee](https://wordpress.org/support/users/eedee/)
 * (@eedee)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/responsive-height-9/#post-12525766)
 * Hey [@dimizu](https://wordpress.org/support/users/dimizu/),
 * v3 is out with lots oft responsive setting. Closing the issue.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Responsive height’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gutenslider_814abc.svg)
 * [WordPress Slider Block Gutenslider](https://wordpress.org/plugins/gutenslider/)
 * [Support Threads](https://wordpress.org/support/plugin/gutenslider/)
 * [Active Topics](https://wordpress.org/support/plugin/gutenslider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gutenslider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gutenslider/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [eedee](https://wordpress.org/support/users/eedee/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/responsive-height-9/#post-12525766)
 * Status: resolved