Here’s the dilemma. I have a mysterious padding between the top of the body and the top of my #wrapper. Everything looks fine w/ the source code (in correct flow order). Using Firebug, I notice my stylesheet link, jQuery script, EditURI, WLWmanifest show up inside the <body> tags (-which Firebug says these links are 0x14px in size, presumably the gap I’m referring to.)
Here’s the background:
When creating my page.php file(included below) I have no issues with the mysterious padding or misplaced links and scripts… but when I decide to cut up the top half and bottom half placing them accordingly into header.php and footer.php (#mainand above and end of #main div and below) whilst making my calls get_header and get_footer -is where my problem occurs…
Unfortunately I’ve got this on a local build… but can someone help shed some light?
Just made an account to say THANKS for the tip of copy paste… I had the same problems, padding on the top, misplaced links and scripts, no validation… horrible! All because of some %^$^%#^%&$ characters (i put the blame on notepad++ which i used for a while…)
I have had this problem on a couple of sites (one Joomla, one just running PHP).
It turns out it was the specific encoding of the files: I needed to change them from UTF-8 to “UTF-8 without BOM” (BOM=”byte-order-mark”) in Notepad++ to fix.
Until I stumbled across that, I was tearing my hair out: exactly as you described, extra space at the top (all browsers), inspect element in either Firefox or Chrome showed scripts etc. included in the body, not head, even though “View source” showed them all in their proper locations. VERY weird.
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘[Resolved] head scripts/links showing up inside body tag’ is closed to new replies.