Heather Solomon's Blog

SharePoint 2007 Branding

Article Categories
Post Categories


  Jump to: Follow speheather on Twitter Follow Heather Solomon on Facebook
Heather's SharePoint 2010 Blog is located at blog.sharepointexperience.com
Loading

I came across a new issue this week.  All of my custom master pages that I have done (including the base code I provide here) include a DOCTYPE tag that references the latest HTML specifications (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">).  Unfortunately, the master page file used by default for SharePoint (default.master) does not specify a DOCTYPE tag at all.   So when the browser page renders the code, it reverts to quirks mode, which renders the HTML according to old rules.

This has a cascade effect. The default SharePoint styles have been coded to style old HTML specifications, instead of the new ones.  This means deprecated styles elements are used since old HTML rules are being applied to the page.  Most notably, the HEIGHT attribute for table cells is used in the SharePoint styles, and this is a deprecated property in HTML 4.0.  

So far I have only found a small handful of issues where this becomes a problem if you are specifying a correct DOCTYPE tag. There are a few styles used in the Calendar display that rely on the HEIGHT attribute to set table cell heights.  Click here to see these issues. For the second issue listed, I have a fix.

As a web designer, I am not willing to revert to using quirks mode for rendering the pages.  It is not the appropriate solution IMHO.  Current DOCTYPE tags should be specified for pages. Instead I plan (or will try :-P) to create a new Events feature that styles the calendar differently to correct this issue created by the lack of a  DOCTYPE tag in the default code for SharePoint.

So this serves as a heads up warning to anyone creating master pages, or using my base master page code.

posted on Wednesday, February 21, 2007 9:43 AM

Copyright © 2005-2011. Heather Solomon.
Site design by Heather Solomon. Yes it is dated and purple. If I changed it, no one would recognize it! Check out my new home at sharepointexperience.com.

Blog Stats:
Posts - 390
Stories - 39
Comments - 1795
Trackbacks - 183
Follow speheather on Twitter

Follow Heather Solomon on Facebook

Branding/UI/UX Courses for SharePoint taught by Heather Solomon

VIEW COURSE SCHEDULE