• I have custom child theme with reduced header height and margins and paddings changed all over the places.

    Now everything works well except one thing….

    Sidebar is responsive and goes way below the footer bottom if content on the page is bit less. Having lot of widgets in the sidebar.

    You can see the screenshot here:

    http://s24.postimg.org/72s11cehx/Untitled.png

    I have learned that it is adjusted via js/functions.js file in the theme folder.

    code:

    /**
    	 * Adds a top margin to the footer if the sidebar widget area is higher
    	 * than the rest of the page, to help the footer always visually clear
    	 * the sidebar.
    	 */
    	$( function() {
    		if ( body.is( '.sidebar' ) ) {
    			var sidebar   = $( '#secondary .widget-area' ),
    			    secondary = ( 0 == sidebar.length ) ? -40 : sidebar.height(),
    			    margin    = $( '#tertiary .widget-area' ).height() - $( '#content' ).height() - secondary;
    
    			if ( margin > 0 && _window.innerWidth() > 999 )
    				$( '#colophon' ).css( 'margin-top', margin + 'px' );
    		}
    	} );

    Now I tried to changed it via this js code but it doesn’t work. Any Ideas how to solve this for customized child themes?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Footer margin-top for child theme’ is closed to new replies.