WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] body has margin-top on front-page, even without admin bar (4 posts)

  1. addictable
    Member
    Posted 1 year ago #

    As you can see on my site http://addictable.de/, there is a margin added at the top of the page without me wanting it to be there.
    If you look at an article (http://addictable.de/?p=1) 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.

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    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.

  3. addictable
    Member
    Posted 1 year ago #

    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.

  4. jabbo126
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic