To remove html { margin-top: 28px !important; } from wordpress header go to /wp-includes/admin-bar.php and edit around line 672 (in WordPress 3.3)
Alternatly you can add a remove_action filter in you active theme/functions.php file like this, as this is a part of _admin_bar_bump_cb function which is defined in above mentioned file:
add_action('get_header', 'my_filter_head'); function my_filter_head() { remove_action('wp_head', '_admin_bar_bump_cb'); }
You can check detailed discussion here, http://wordpress.org/support/topic/31-update-causing-28px-top-spacing-in-html-body
Thank you so much for making this! It worked like a dream.
More Easy way:- open wp-includes folder there is a file name admin-bar.php open it in editor and search your margin like 28px or 32px; remove this space where you get this. It will work f9 for you.
My dear Suraj, you should not touch core files as they are subject to be updated automatically :)
As mentioned in another comment (here by Wellen) this space is due to the fact that you have had a logon using admin details and for some reason (js or css) glitch the admin bar failed to load. So once you have that issue fixed you wont need to fix this margin at all. I hope that makes sense.
verrry nice trick….I like it….
Thanks dude it works.
oh hohoh
its working and it is best i am very depressed.
thank u man or……
Thanks this is working 100% ….
Thank you for your tutorial, Arvind K. This is what I need: D
You save a lot of my time
Thank you wellen!
you needn’t to remove it,the space on the header cause u have login.
that’s the space for the admin bar.