Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1294749

    Hi,

    I’m looking for a css code to get a fixed footer that only appears when the mouse goes to the bottom of the page.

    Like on this web site : https://www.sernball.fr

    Best regards

    #1295128

    Hey asplinstudio,

    There’s nothing like that in the theme by default unfortunately, and creating something like that would be out of scope of theme support. You could try searching for a plugin or third party code.

    Best regards,
    Rikard

    #1295141

    this is called curtain effect and you can try this:
    https://kriesi.at/support/topic/fixed-curtain-footer/#post-691135

    see result here ( only starting page ) : https://webers-testseite.de/pureinstall/

    on my testpage i use this in child-theme functions.php:

    // curtain effect of footer - 
    function add_curtain_footer_effect(){
    if(is_home()){  
    ?>
    <script type="text/javascript">
    (function($) {
        $(window).bind("load resize", function() {
    	    setTimeout( function() {
    			var socketh = $('#socket').outerHeight();
    			var footerh = $('#footer').outerHeight();
    			var spacerh = socketh + footerh - 5 ;
    
    			$('#distance').css('height', spacerh );
    			$('#footer').css('bottom' , socketh);
    	    }, 150) 
        });
    })(jQuery);
    </script>
    <?php
    }
    }
    add_action('wp_footer', 'add_curtain_footer_effect');

    and on quick css ( pay attention as the script above this is all only for home – so adjust to your needs):

    .home #main > div  {
        z-index: 3 !important;
        position: relative !important;
    }
    
    .home #footer { 
        left: 0;
        width: 100%;
        z-index: 2;
       position: fixed
    }
    
    .home #socket {
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 2;
        position: fixed
    }
    
    .home #main #distance  {
        clear: both;
        z-index: 0 !important;
    }
    #1295144

    see complete post here: https://kriesi.at/support/topic/fixed-curtain-footer/
    With a little distance now – i think i can try a combination of ismaels code and mine to optimize the script.

    #1295676

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.