• Resolved ljvx

    (@loothi)


    Hi y’all.

    I’m no css expert so trying to figure out why there is so much whitespace on my site before the footer.

    Can you have a look and see what I need to do? I have a child theme I am editing.
    https://martinventura.com/

    I already halved the padding on the site-footer. Still lots of space…

    Ta
    Lucy

Viewing 2 replies - 1 through 2 (of 2 total)
  • There are double child theme stylesheet enqueued in the head, this below is what is showing in the source.

    <link rel='stylesheet' id='parent-style-css'  href='https://martinventura.com/wp-content/themes/gridsby/style.css?ver=4.2.2' type='text/css' media='all' />
    <link rel='stylesheet' id='child-style-css'  href='https://martinventura.com/wp-content/themes/gridsby-child/style.css?ver=4.2.2' type='text/css' media='all' />
    <link rel='stylesheet' id='gridsby-style-css'  href='https://martinventura.com/wp-content/themes/gridsby-child/style.css?ver=4.2.2' type='text/css' media='all' />

    There should be 1 from parent theme, and the other 1 from child theme, but you got double from child theme’s. So please check the enqueue function in child theme’s functions.php. This problem must be addressed first before getting into making changes in child theme’s CSS.

    Regarding the big space in footer: you got 2 instances of .site-footer with its padding value assgined in your child theme style.css

    /* halve the site-footer padding LJN */
    .site-footer {
    	text-align: center;
    	font-size: 13px;
    	text-transform: uppercase;
    	padding: 20px 0 20px;
    	letter-spacing: 0.025em;
    }
    
    /*center site info */
    .site-footer {
    
    	text-align: center;
    	font-size: 13px;
    	text-transform: uppercase;
    	padding: 50px 0 65px;
    	letter-spacing: 0.025em;
    }

    In CSS, if all else equal, the one declared later (after) will win. So that explains the big padding there. Also, there is no need to re-declare the same property with same value.

    Apart from that, there is bottom margin of .site-content that we can adjust lower to reduce the white space, currently it is 50px.

    .site-content {
      margin-bottom: 50px;
    }
    Thread Starter ljvx

    (@loothi)

    Thanks muchly for spotting my mistakes! Corrected, and the second enqueue has been removed too.

    Getting there now….

    Cheers!
    Lucy

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Why so much whitespace before the site-footer?’ is closed to new replies.