Fatih Donmez
Fatih Donmez

Reputation: 4347

Html header part appears in body with space

After some updates my landing page just broken. There is a empty head part when inspect element in chrome, and all head items placed in body tag. but when i look for the http response it's all correct.

There is a also space in the beginning of body part which brokes the layout. Here you can see it http://www.sporapp.com/

btw. it's working on local.

Upvotes: 4

Views: 2258

Answers (3)

Viktor S.
Viktor S.

Reputation: 12815

I see some empty line in response before a doctype declaration. After I copy/pasted HTML from Chrome network tab I found some ? symbol right before doctype (looks like that is some symbol which notepad++ can't display for some reason). Check that file in vim on your server. Suppose you will find a symbol before doctype you do not have on your local machine. Remove it and suppose it will work (it works on my machine, at least head is parsed correctly) enter image description here

From question author:

For BOM thanks for the Mercurial, it broked the encoding and causes the BOM. And also there was a php file which enclosed ?> then follow by white spaces. After update the broken file and remove the white space, finally it is ok :) ..

Upvotes: 4

Robert Peters
Robert Peters

Reputation: 4104

Run it through a validator: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.sporapp.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

I would guess the meta tag errors are causing the issue.

Upvotes: 1

HasanAboShally
HasanAboShally

Reputation: 18675

Just remove the empty line you have after the opening body tag :)

Upvotes: 0

Related Questions