• hi there, i have a site that will lining up properly when i remove the <?php wp_head(); ?> tag from the header file. but i need to keep it intact so that i can get plugins to work properly. here is the page that i’m working on, and i would really be grateful for any feedback about how i could get the background image to line up at the top: https://www.leighbardugo.com/glamour/

    i’ll paste the code from my style.css code below. it’s quite hacked up at this point, but any advice is appreciated! (oddly enough it’s showing up okay in firefox.)

    thanks, denise

    [CSS moderated as per the Forum Rules. Please just post a link to your site.]

Viewing 4 replies - 1 through 4 (of 4 total)
  • I just looked at your site (which looks really cool, by the way) in Chrome, Firefox, Opera, and Safari on my iMac. I don’t see what you are talking about.

    If you are having the problem in IE, and only in IE, then I would make this suggestion:

    Copy your style.css and name it style-ie.css

    Then, in your header.php file, you should copy and paste this code:

    <!--[if lt IE 9]>
    <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/style-ie.css" />
    <![endif]-->

    Then, edit this stylesheet to make it look good in IE.

    Thread Starter denisebiondo

    (@denisebiondo)

    oh, my gosh… i think that it fixed itself! sometimes turning off the computer and doing something else is the best thing to do! wow. i’ll keep this bit of code should i run into the problem again. thanks so much for your feedback, and your compliments ??

    This may have been related to the admin bar. If you were logged in and didn’t have <?php wp_footer(); ?> somewhere before your closing body tag, then the script for the admin bar wouldn’t load, yet the css for it that loads through <?php wp_head(); ?> would cause a 28px margin at the top to be added on all pages.

    Now that Troy mentions it, I think that is actually most likely your problem. I know I have disabled the admin bar from showing up when viewing some of my sites, because it does mess with the positioning of some elements.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘remvoving top header margin’ is closed to new replies.