Tom
Tom

Reputation: 745

Use of HTML 5 doctype creates a gap at top of page on iphone safari browser

Update: Please disregard, my problem was caused by an advertisement bar being inserted by the vendor who provides my workplace wireless service.

I was building a mobile friendly website and wanted to use HTML 5. However when I specify the doctype as <!DOCTYPE HTML> , I get a gap at the top of the page on safari on the iphone.

I notice that other sites have the same problem such as nextstop.com and nike.com

I guess safari does not fully support HTML 5 yet. Anybody know of a workaround?

Upvotes: 0

Views: 1198

Answers (2)

zneak
zneak

Reputation: 138061

HTML 5 is still in a very unstable state. Don't use it in a production environment.

Edit Just so you guys know what it's about, HTML 5 is currently an Editor's Draft, and the document clearly states (in the Status of This Document section) that this specification is not stable, and that a consensus may not have been reached on any of the proposed sections. I think it should be clear enough that it means it's a bit early to start using it.

Upvotes: 1

Gaurav
Gaurav

Reputation: 12796

All browsers correctly interpret the HTML doctype. Putting it in sets your browser into Standards Compliant mode, that is the only difference with or without the doctype.

You can use a CSS reset tool like http://meyerweb.com/eric/tools/css/reset/ to get rid of default margins and padding on all elements.

Upvotes: 0

Related Questions