Pricing Process Reviews Contact

Divi Guy blog

Make Divi footer stick to bottom on short pages

If you want make the footer display at the very bottom for short content pages, you can use the code below. Paste this in the Divi Options/Ingergration area in the header section. Make sure to put this inside of a script tag.

jQuery(function($){
function stickyFooter(){
var footer = $("#main-footer");
var position = footer.position();
var height = $(window).height();
height = height – position.top;
height = height – footer.outerHeight();
if (height > 0) {
footer.css({‘margin-top’ : height+’px’});
}
}
stickyFooter();
$(window).resize(function(){
stickyFooter();
});
});

Need a hand?

Need help with your Divi website?

Book a Divi consultation and we can fix it together over Zoom, or ask for an estimate for bigger jobs.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Search

Browse

More tips

Got a question?

Ask me anything

Stuck on something in Divi or WordPress? Ask away and I will reply by email, usually within 24 hours.

Ask a Question

Tell me about your project. The more details the better.

"*" indicates required fields

Make a payment

Got an invoice?

Pay an invoice, a deposit or a tip in about a minute. Card or PayPal, secure checkout, and I never see your card number.

Make a payment