Question

I am developing for SharePoint 2007 and my pretty code is being broken, presumably by code SharePoint generates around my Content Editor web-part. My understanding is, because there is no "top level" doctype declaration made before SharePoint sends the code to the browser, Internet Explorer is forced to render the page in quirks mode. Thus, the entire page is rendered without respecting certain CSS declarations and my page looks wrong.

I have hopes of convincing the powers that be that this issue is worth fixing, but I figure I need to be able to tell them what I want...

So, what doctype would work best when I'm writing in XHTML (strict) with CSS2 but the stuff surrounding my code is not strict?

Was it helpful?

Solution

<!DOCTYPE html>

This declares your document as HTML5, and HTML5 clearly defines how browsers should handle broken code so your result should look the same on all browsers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top