Support » Fixing WordPress » margin-top added to html and body tags after upgrade to 3.1!?!

  • Resolved fgshepard

    (@fgshepard)


    We upgraded to 3.1 this morning and now find the following style rule dynamically added to our header:
    <style type=”text/css”>
    html { margin-top: 28px !important; }
    * html body { margin-top: 28px !important; }
    </style>

    This is not in our “header.php” file and so I assume it’s being added by wordpress (i.e., there is no evidence that we’ve been hacked). I’m guessing it has something to do with the new admin bar but not sure. Any ideas what’s going on or how to turn it off?

    Here’s a URL:
    http://www.ircpl.org

Viewing 4 replies - 31 through 34 (of 34 total)
  • I’m actually seeing this issue as well and the proposed solutions are not working for me. I have a new 28px margin at the top of my site, and when I look at the styles in Firebug, it says that it’s coming from a stylesheet in the root folder of my WP installation; the root folder is called “amnesty” and the alleged stylesheet is “amnesty#4”.

    The style is set as “!important” so I can’t override it.

    Anybody else seeing this?

    After upgrading to 3.1 and seeing the 28px drop that made my theme look silly, I googled and found someone has written a plugin to take care of this 🙂 It’s very simple to use, check it out- http://wordpress.org/extend/plugins/wp-custom-admin-bar/
    The code listed in this thread hadn’t worked for me, so I was SO happy to find this! Thought I’d come back here and share. Hope it helps.

    just go to dashboard, click on your profile “Howdy Jimmy” (or whatever your name is), then uncheck the box that says show admin bar.

    This should remove the white space (28px top margin) that wordpress 3.1 adds.

    wambamboo

    (@agatha1)

    I’ve tried all the suggestions above, and have managed to disable the admin bar, but the white space is still showing at the top of the page, even after clearing cache and testing is different browsers.

Viewing 4 replies - 31 through 34 (of 34 total)
  • The topic ‘margin-top added to html and body tags after upgrade to 3.1!?!’ is closed to new replies.