Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm very new to sharepoint development and I would like to know, if it is possible to change the doctype in SharePoint just for one page (or better for a webpart, I think just for a webpart or is it not possible)? If I change the default.master doctype, will the complete doctype for SharePoint change?

What is the best way to provide a webpart the <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"" http://www.w3.org/TR/html4/loose.dtd"> doctype?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

I don't think there is a way to change the Doctype (as it's read only) for a single page or Webpart. Either you have to fix the CSS ( I would strongly suggest) OR change the Doctype for the master page which would effect the whole site collection.

share|improve this answer

If you change the doctype on a masterpage, it only affects pages that inherit that masterpage within that site collection unless you take steps to deploy it everywhere within the farm.

share|improve this answer

My understanding of the dtd is that the only practical effect of most of these doctype declarations (excl. XHTML strict) is to enable older versions of IE to switch from quirks mode to standards compliant mode. does this just fine, as does pretty much every doctype, and you can also use the x-ua-compatible meta-equiv instead, which works in IE7+ (SP2010 doesn't support IE6).

I would be interested to know: Do you have some practical requirement for that specific doctype? What is the purpose of changing it?

share|improve this answer
    
I had some css stuff, which just works fine with loose... Now i changed it and the site works pretty well. Thanks everybody. –  hofmeister Oct 11 '11 at 5:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.