WordPress.org

Ready to get started?Download WordPress

Forums

wp_head puts margin on my page (4 posts)

  1. Extelliqent
    Member
    Posted 2 years ago #

    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 ?

  2. johncarb
    Member
    Posted 2 years ago #

    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:

    http://wordpress.org/support/topic/unwanted-margin-resulting-from-wp_head

  3. bnther
    Member
    Posted 2 years ago #

    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?

  4. bnther
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags