• Hi;

    <?php wp_head(); ?>

    This code is putting

    <style type="text/css" media="screen">
    	html { margin-top: 28px !important; }
    	* html body { margin-top: 28px !important; }
    </style>

    into <head> part of my page and I don`t know how can I change it .. I found solution by adding this just after it;

    <style type="text/css" media="screen">
    	html { margin-top: 28px !important; }
    	* html body { margin-top: 28px !important; }
    </style>

    but is there anybody knows why it does like that and/or how can I fix it ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • This happened to me. I was creating a theme from scratch and hadn’t added the footer code. Once you do that, you will see the admin bar and all will become clear. I found the answer here:

    https://www.ads-software.com/support/topic/unwanted-margin-resulting-from-wp_head

    I am also having the same issue with Chrome. Unfortunately, when I added the <?php wp_footer();?> into the footer, I get some sort of extra tool bar across the top which the client does NOT want. Is there a way to get rid of the padding call out and still keep the wp_head() without adding the wp_footer? If not, then how would I delete that unnecessary business that’s being added?

    There is a plug-in that I found that removes this — Global Hide/Remove Admin Bar Plugin.

    It’s seems a little skewed to me that I would have to install a plug-in in order to remove an add-on feature…but I’ll take it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_head puts margin on my page’ is closed to new replies.