Hello,
I have a full with slider and a grid row right under it and I would like the grid row to fill up the rest of the screen no matter what the screen size is.
Can you please help me?
I found this on your support but I am unable to readapt the custom-grid calculation formula:
add_action('wp_footer', 'ava_grid_height');
function ava_grid_height(){
?>
<script>
(function($){
$(window).resize(function() {
var win = $(window),
calc_height = function() {
var winh = win.height(),
header = $('#header').height(),
title = $('.title_container').height(),
gridh = winh - header - title;
$('#custom-grid').css('height', gridh/1.5 + 'px');
}
win.on( 'resize', calc_height);
calc_height();
}).resize();
})(jQuery);
</script>
<?php
}
Hi mndsn!
Have u added a custom Class, so you can target the row with the CSS?
Regards,
Basilis
Hello Basilis,
I have added “custom-grid” to the grid row’s developer ID section and it is still in place.
Some changes apeared on the grid row however they didn’t correspond to the desired changes.
Based on what I have observed the only thing that needs to be done is adapt the formula for the height calculation to:
Grid height = screen height – full width slider height
I would be thankful if you can help me with the formula, however if you have any other ideas, I would be happy to implement them.
Thanks