Home Forums Porto Template Sticking Footer to the bottom

This topic contains 3 replies, has 2 voices, and was last updated by  Support2 2 weeks, 6 days ago. This post has been viewed 92 times

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

    Kirito
    Participant

    Hi, is it possible to stick the footer to the bottom of the page? I a page with only one control and that is causing a blank space after the footer. It’s not looking good. Thanks.


    #10023546

    Support2
    Keymaster

    Hello, thanks for your purchase.

    You can do that with JS, please try the following code:

    (js/custom.js)

    var header = $('#header'),
    	footer = $('#footer'),
    	main = $('.main'),
    	height = 0,
    	setMainHeight = function() {
    		height = ($(window).height() - header.outerHeight() - footer.outerHeight()) -50;
    		main.css('min-height', height);
    	};
    	
    setMainHeight();
    
    $(window).resize(function() {
    	setMainHeight();
    });

    Note that where I used -50 is the “gap” you can change based in the content and structure.

    Kind Regards,

    Jonas


    #10023549

    Kirito
    Participant

    Hey Jonas,

    thanks for that – works perfectly on the contact page.

    Now https://trockenbausahin.de/Wetterdienst on this page it doesn’t work. Something about the owl-carousel breaks that solution.

    Kind Regards,
    Okan


    #10023553

    Support2
    Keymaster

    Hello,

    It’s missing close a div in your HTML.
    Please, add the </div> like showed on image below:

    Please, try that and let me know if you need further assistance.

    Kind Regards,

    Rodrigo.


Viewing 4 posts - 1 through 4 (of 4 total)