Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #502995

    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
    }
    #503037

    Hi mndsn!

    Have u added a custom Class, so you can target the row with the CSS?

    Regards,
    Basilis

    #503051

    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

    #503138

    Hi!

    Can you please provide a screenshot of the layout you’re after? The script should apply the height of the window screen minus the height of the header and title container. I added the code on function.php and it works OK.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.