Search code examples
cssprestashopfooterspace

Prestashop - How to add or remove space between footer and page content


I would like to ask you some help about managing the space between the footer and the page content in Prestashop.

My Prestashop version is 1.6.1.17.

The website is www.backlabel.com.

I have the following problem:

  • On the home page, the space between the embedded video and the footer is greater that I want to be and would like to reduce it. However I cannot identify, even through the Inspect Function of Chrome browser, the part that I should modify and I'm lost.
  • I know that in asylum.css there is a #footer part that has some specifications, however I already have removed its margin, and that space still remains. See image below for more clarification. Distance between embedded video and footer highlighted in red
  • On the login page, having removed the margin from the footer, subsequentially it remains very attached to the content while instead I would like to add a space and to make the footer stay on the bottom. See image for more clarification.

Can anyone help?

Thank you in advance


Solution

  • For the space on between your video and the footer, this css code will solve your issue :

    body .cms_24 .wht_bg{
      top:0;
    }
    

    For your 3rd point (login page), use this JS code to keep your footer always at the bottom. Tested and works great.

    var docHeight = $(window).height();
    var footerHeight = $('#footer').height();
    var footerTop = $('#footer').position().top + footerHeight;
    if (footerTop < docHeight)
        $('#footer').css('margin-top', (docHeight - footerTop) + 'px');
    

    cheers :)