Make Divi footer stick to bottom on short pages

TIPS

Jun 27, 2018 | Divi Tips | 0 comments

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.
[php]
<script>
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();
});
});
</script>
[/php]

0 Comments

Submit a Comment

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

More Tips

Ad - Web Hosting from SiteGround - Crafted for easy site management. Click to learn more.

Cloudways Hosting

WPEngine Hosting

Pressable Hosting

AccuWeb Hosting

Ask the Divi Guy a Question

"*" indicates required fields