I've been pulling my hair out trying to work out what's happening here. I have some code for a site that has a header in this sort of pattern:
<head>
<title>Page</title>
... other normal head stuff ...
</head>
<body>
... body stuff ...
which is pretty usual. In all browsers this displays properly, except on one page in both Chrome and IE there is a gap appearing at the beginning of the body causing all the content to be pushed down.
I've inspected the code using dev tools in chrome, and it seems to be rearranging the header stuff to look like this:
<head></head>
<body>
"
"
<title>Page</title>
... other normal head stuff ...
... body stuff ....
This " " space is causing linebreaks to be added at the beginning of the page, and the contents of <head>
to be moved after <body>
. As I say, this is only ONE page it's occurring in in Chrome and IE, which is the confusing part as all pages in the site have the same header file included.
Deleting the " " from within the dev tools corrects the problem, but this is no where in the actual source code.
Why would it be rearranging the contents of <head>
and adding that weird extra space? Anyone have any experience with this?