Skip to main content
How to Create a Footer Reveal Effect Without a Plugin

Learn how to create a stylish footer reveal effect using CSS and JavaScript, enhancing your website's design without a plugin.

Updated over 3 months ago

Adding a footer reveal effect to your website can enhance its visual appeal and provide a modern touch to your site's design.

This effect ensures that the footer smoothly slides into view as the user scrolls to the bottom of the page, creating a dynamic and engaging browsing experience.

This article will walk you through the steps to create a footer reveal effect using simple CSS and JavaScript. Follow our guide to add this sleek feature to your website and impress your visitors.

  1. Go to Divi Theme Builder and create a Footer layout. This could be a Global Footer or a Footer layout assigned to a specific page.

  2. Edit the section that contains all the footer information and go to Advanced Tab CSS ID & Classes CSS Class and input divi-site-footer-section.

    Footer section class

  3. Go to Advanced Tab Position and set its position to Fixed

    Footer section positioned fixed

  4. Use the Location option and set the position to be Bottom Centered

    Footer section fixed location

  5. Go to Divi Theme Options General Tab Custom CSS and add this CSS code:

    #page-container:has(.divi-site-footer-section) #main-content{
    z-index: 2;
    position: relative;
    }

  6. Go to Divi Theme Option Integration tab Header and add this JS code:

    <script id="divi-reveal-footer-effect">
    (function ($) {
    function diviCalcFooterHeight() {
    var footerHeight = $('.divi-site-footer-section').outerHeight();
    $('#main-content').css('margin-bottom', footerHeight);
    }
    $(document).ready(function () {
    diviCalcFooterHeight();
    });
    $(window).on('resize', diviCalcFooterHeight)
    })(jQuery);

    </script>

You can see the result in the below GIF:

Did this answer your question?