• I’m new to GeneratePress so I’m testing with the free version as of now. I wanted to remove header and footer so I used CSS to do that. Footer is removed and looks clean but header leaves this white space that can’t be removed unless if I use negative padding?
    But that’s probably not the ideal way right? Is there something wrong in my CSS code? Here it is:-
    header#masthead {
    display: none;
    }

    I had posted this in your facebook group and someone told me to remove these lines from header.php and footer.php files and save the files
    do_action( ‘generate_header’ );
    do_action( ‘generate_footer’ );

    I did that which basically did the same thing as my css code but on a sitewide level. But that still didn’t solve my issue. I still see white gap on any page built with any page builder like beaver, divi or elementor. Except gutenberg.

    Check this page on the same test site: https://mylabsite.xyz/
    With gutenberg there’s no white space on top.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    Try this CSS:

    .entry-content:not(:first-child), .entry-summary:not(:first-child), .page-content:not(:first-child) {
        margin-top: 0;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Thread Starter Soum

    (@soumahmed)

    That solved the issue when I used customizer > additional css

    But when I added it in code snippets plugin and ran it in frontend then the page showed some error. When activate the snippet on front and backend both then it crashed my site and I can’t access my wp-admin anymore. “there has been a critical error on the site”. The same site in the original post.

    Additional CSS should be the way to go for adding CSS.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Weird white space on header’ is closed to new replies.