Support » Fixing WordPress » body has margin-top on front-page, even without admin bar

  • Resolved addictable


    As you can see on my site, there is a margin added at the top of the page without me wanting it to be there.
    If you look at an article ( the margin is not shown – as it would be supposed to be on every page.

    The margin would make sense if the admin bar was shown. The thing is: I can see the margin without being logged in and only on the front page.
    When I am logged in, I can see the admin bar on the front page and on the article pages. But the margin, which would then make sense on every page so that the admin bar wouldn’t cover anything, is missing on the article pages when I am logged in.

    I turned off the admin bar, I even tried plugins to deactivate it. The margin simply would still be there and visible for everybody.

    I would be so grateful for a little help. I’m pretty desperate as I have no idea how to fix this.

    PS: The site is still under construction, so don’t wonder why the navigation is linked to the front-page or why the sidebar isn’t showed correctly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Andrew Nevins


    You have invalid markup on the webpage the rogue margin appears.
    Use W3C’s Validator to highlight the invalidity.

    You can spot-the-difference the source code between one working webpage and one broken webpage.

    Thank you so much!
    I solved it by saving my files without the BOM and now everything works fine. The BOM must have added an additional line on the front page.

    Oh my God! Addictable, you don’t even know what you did – you just save my sanity. I was losing my mind with this problem. This BOM makes me headaches previously with functions.php, but i never thought that extra margin is caused by this! Thanks very, very much!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘body has margin-top on front-page, even without admin bar’ is closed to new replies.