tolipoc
Member
Posted 2 years ago #
Hello!
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!
You would need to post a link to the site for anyone to be able to help.
It might help if we could see the site in question.
tolipoc
Member
Posted 2 years ago #
Thanks, yes sorry (forgot that :/ )
http://kvillebacken.dev.way2it.com/
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)?
tolipoc
Member
Posted 2 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!!!
there are some validation errors in your site that could disturb the layout:
http://validator.w3.org/check?uri=http%3A%2F%2Fkvillebacken.dev.way2it.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
mainly this line
<link rel="shortcut icon" href="http://kvillebacken.dev.way2it.com/wp-content/themes/kvillebacken/../../images/favicon.ico" ></head>
henkholland
Member
Posted 2 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.
tolipoc
Member
Posted 2 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!