Ready to get started?Download WordPress


[resolved] Top or header margin / space problem (recurring) (8 posts)

  1. tolipoc
    Posted 4 years ago #


    I'm building a WordPress site and I keep getting some kind of margin or space at the top (26px to be precise). I've done a fair bit of CSS through the years so margin:0 padding:0 is already there. This is my second WordPress site and I had that problem with the last site too... I've googled for quite a while and couldn't find a solution to this (not too keen to do margin-top:-26px).

    The site I'm building is a WordPress / blog -version of an already existing site, so the only "content" (graphics and CSS) I've got on the WordPress version so far is from the original site (where there is no problem of this kind). I'm thinking it's WordPress generating this problem, or I'm doing something very wrong since I have this problem for the second time.

    Any help appreciated, thanks!

  2. Jonas Grumby
    Posted 4 years ago #

    You would need to post a link to the site for anyone to be able to help.

  3. Roy Ho
    Posted 4 years ago #

    It might help if we could see the site in question.

  4. tolipoc
    Posted 4 years ago #

    Thanks, yes sorry (forgot that :/ )

    As you can see it's the "headerwrapper" div that's pushed down.
    As this is the blog version of this site: http://www.kvillebacken.se (which I didn't code) I suspect it's WordPress causig the problem (or me doing something very wrong)?

  5. tolipoc
    Posted 4 years ago #

    Still haven't found a solution to this... It must be WordPress printing something in the html head. Plus, if you view the site with Firebug, some of the links in the html head is inside the body tag. Strange this. I'd very much appreciate any help!!!

  6. there are some validation errors in your site that could disturb the layout:

    mainly this line

    <link rel="shortcut icon" href="http://kvillebacken.dev.way2it.com/wp-content/themes/kvillebacken/../../images/favicon.ico" ></head>
  7. henkholland
    Posted 4 years ago #

    There is an empty DIV headerext right before right before pagewrapper, probably in your header.php and it has a top-margin of 26px but also a header background image in the css line 242.
    Not sure how it interacts. Try taking the DIV headerext out.

  8. tolipoc
    Posted 4 years ago #

    Yes! It was the favicon link (which was added through a function in functions.php)! Thank you alchymyth! (and everybody else :).
    @henkholland Yes I added the 26px to get it all pushed down when I was working. Problem solved now!

Topic Closed

This topic has been closed to new replies.

About this Topic