• Hey,

    after turning my HTML file into a custom WordPress theme I found an extra white space above my header in Firefox (about 28px). The weird thing is that the extra white space doesn’t appear in Safari (I haven’t tested it on other browsers yet). Although I managed to remove the extra white space using a Gecko hack:

    body:-moz-last-node #wrapper{margin:-28px 0 0 0;}

    I am wondering what the problem is.

    Does anyone have an answer for me? Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Kathryn Presner

    (@zoonini)

    If you provide a link to your site it’ll be much easier to help. 🙂

    billimarie

    (@billimarie)

    Hi MD84,

    Try logging out and viewing your site. I noticed that Firefox seems to think there’s an invisible admin bar up there, but when I log out of my dash the entire site looks normal–without the random margin-top space!

    -b

    mheltone

    (@mheltone)

    Yep yep..
    If you logout, that white space will disappear.
    I think the <?php wp_head(); ?> is causing that.

    Just guessing…

    Wow. Thanks — this fixed the problem I was seeing. Weird thing, it was on only ONE of my templates! The index and “pagecontent” templates were fine while I was logged in. But the homepage template I made had 25px of blank space above both the #wrapper and the background image (placed at top position)! I was tearing my hair out… But when I logged out, that space disappeared. Definitely Firefox.

    This helped me when I had the exact same issue. Its not an issue with Firefox. Happened with all browsers for me.

    Okay but obviously this is a problem with the admin bar not displaying with a specific theme which suggests the theme is actually buggy. So how do we fix that?

    I fixed my issue, in my case and many others there has to be a call to wp_footer() in the footer.php. In my case I added <?php wp_footer(); ?> right before I closed the body tag in the footer.php and it worked like a charm. I hope this helps you guys!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Extra white space above header in custom theme in Firefox’ is closed to new replies.