<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>SharePoint Magazine &#187; Page layout</title>
	<atom:link href="http://sharepointmagazine.net/tag/page-layout/feed" rel="self" type="application/rss+xml" />
	<link>http://sharepointmagazine.net</link>
	<description>SharePoint Magazine is an online Magazine dedicated to the world of SharePoint</description>
	<lastBuildDate>Mon, 05 Jul 2010 09:14:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SharePoint&#8217;s Branding Limitations, Part 3</title>
		<link>http://sharepointmagazine.net/technical/development/sharepoints-branding-limitations-part-3</link>
		<comments>http://sharepointmagazine.net/technical/development/sharepoints-branding-limitations-part-3#comments</comments>
		<pubDate>Thu, 23 Jul 2009 08:04:48 +0000</pubDate>
		<dc:creator>Diantha van Marion</dc:creator>
				<category><![CDATA[Customisation]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Design Decisions]]></category>
		<category><![CDATA[Front-end]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML-mark up]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[MOSS]]></category>
		<category><![CDATA[News article]]></category>
		<category><![CDATA[Page layout]]></category>
		<category><![CDATA[Pagelayout]]></category>
		<category><![CDATA[Stylesheet]]></category>
		<category><![CDATA[Styling]]></category>
		<category><![CDATA[Tables]]></category>
		<category><![CDATA[web parts]]></category>

		<guid isPermaLink="false">http://sharepointmagazine.net/?p=2810</guid>
		<description><![CDATA[Not all graphical designs for a portal will work in a SharePoint environment. There are a couple of limitations the Graphical Designer must know. A Graphical designer needs to know the scope of the graphical design.
This article will give the graphical designers more insight into the effect of these design decisions.]]></description>
			<content:encoded><![CDATA[<h1>Introduction</h1>
<p>As a Front-end Developer with a background in designing I&#8217;ll show you how to make a graphical design that works for a default SharePoint-environment. If you want to take control over the front-end, don&#8217;t use any themes. Create your art by using style sheets!</p>
<p>Not all graphical designs for a portal will work in a SharePoint environment. There are a couple of limitations the Graphical Designer must know. A Graphical designer needs to know the scope of the graphical design. For example, if a Graphical Designer puts a border on an element like a table, that will take him about 3 minutes to design, but this simple border could take the Front-end Developer a few hours to implement.</p>
<p>It&#8217;s really important that the Graphical Designer and the Front-end Developer work together and have a clear communication about the graphical design. Making a graphical design specifically for a MOSS environment could save you days on the implementation! This article will give the Graphical Designers more insight into the effect of these design decisions.</p>
<p>This article assumes that the reader has SharePoint and basic HTML knowledge.</p>
<h1>Web parts</h1>
<p>This section is all about SharePoint&#8217;s web parts. First the display mode of the web parts will be the point of interest, then the Edit mode, and after that the Article page layouts will be discussed.</p>
<p>The &lt;td&gt; with class name <span style="color: #ff6600;">.ms-bodyareacell </span>is the overall container for the content. Inside this &lt;td&gt; is a table with class <span style="color: #ff6600;">.ms-propertysheet</span>, and a td<span style="color: #ff6600;">.ms-bodyareaframe</span> inside that there is another table. These  are the containers for the content on a page and are being defined in the page layout. Inside the <span style="color: #ff6600;">.ms-bodyareaframe</span> are a few nested tables and one of these tables is the table of a web part.</p>
<pre><img class="alignnone size-full wp-image-2811" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-table.jpg" alt="wp-table" width="790" height="387" /></pre>
<h2>Web part ID&#8217;s</h2>
<p>If a web part is placed inside a web part zone, it will get an ID. Depending on the amount of already placed web parts on that page, and the order in which they are placed, the ID will get its tracking number. It does not change when you change the order of the web part zones. So therefore, the ID of the web part actually isn&#8217;t unique, it is just unique for that page.</p>
<pre><img class="alignnone size-full wp-image-2817" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-id.jpg" alt="wp-id" width="445" height="211" /></pre>
<p>The web part in this example is the third web part of the page and as you can see, it carries number 3 in the ID. The search interface in the header is always the first web part of the page. In this case there were two web parts placed on the page, which together with the search makes three: the ID number of the last placed web part. If you want to style the web part in its entirety, you can only list all the web part ID&#8217;s and add styling to them. This nasty solution is the only solution to styling every web part on itself. A better solution would be for example to style the elements inside the web parts, such as the<span style="color: #ff6600;"> .ms-WPBody</span>.</p>
<pre>..
#MSOZoneCell_WebPartWPQ27,
#MSOZoneCell_WebPartWPQ28,
#MSOZoneCell_WebPartWPQ29,
#MSOZoneCell_WebPartWPQ30{
     Border:1px #f2f2f2 solid;
}</pre>
<p>Because every web part has a &lt;td&gt; and inside that a table as a container, it is possible to style the background of the web part with two background images, but it is very tricky an I advice you not to do so. Make sure every &lt;td&gt; with ID <span style="color: #ff6600;">#MSOZoneCell_WebPartWPQ2</span> (a web part ID of your choice) has a background image.  Then style every table inside the &lt;td&gt; with those ID&#8217;s with another background image. Secondly, hide every background image on every second or more nested table inside the &lt;td&gt; with the web part ID.</p>
<p>Here&#8217;s an example of how, just for web part ID 3:</p>
<pre>#MSOZoneCell_WebPartWPQ3{
     Background:transparent url(images/webparttop.jpg) repeat-x left top;
}
#MSOZoneCell_WebPartWPQ3 table{
     Background:transparent url(images/webpartbottom.jpg) repeat-x left top;
}
#MSOZoneCell_WebPartWPQ3 table table{
     Background:transparent none;
}</pre>
<p>Which means &#8220;only apply if table is the first element inside <span style="color: #ff6600;">#MSOZoneCell_</span><span style="color: #ff6600;">WebPart</span><span style="color: #ff6600;">WPQ3</span>&#8220;, because it is not supported in Internet Explorer 6 and older versions.</p>
<p>Unfortunately you cannot use</p>
<pre>#MSOZoneCell_WebPartWPQ3 &gt; table {
     ..
}</pre>
<p>Make sure the images you use are repeatable on the x-axis. If they are not, you will need to make a new page layout where the web part zones have a static width (set in the style sheet of course). This way you can control the width of the web parts in a particular web part zone, and make your background images as wide as the web parts.</p>
<pre><a rel="attachment wp-att-3146" href="http://sharepointmagazine.net/technical/development/sharepoints-branding-limitations-part-3/attachment/wp-bg"><img class="alignnone size-full wp-image-3146" src="http://sharepointmagazine.net/wp-content/uploads/2009/04/wp-bg.jpg" alt="wp-bg" width="281" height="148" /></a></pre>
<h2>Web part headers</h2>
<p>Inside the &lt;td&gt; with the web part ID is always a table with two &lt;tr&gt;&#8217;s. The first one is for the header of the web part, the second one is for the content of the web part.</p>
<pre><img class="alignnone size-full wp-image-2818" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-2trs.jpg" alt="wp-2trs" width="540" height="387" /></pre>
<p>The first class you can use to style the header is the<span style="color: #ff6600;"> tr.ms-WPHeader</span>. This &lt;tr&gt; has two &lt;td&gt;&#8217;s, one for the title of the header, and another one for the little arrow on the right pointing down. Only the first &lt;td&gt; has an ID, which has the same ID-number as the web part-ID.  To style the background and the borders of the header, you can style every &lt;td&gt; inside the <span style="color: #ff6600;">.ms-WPHeader</span>.</p>
<pre><a rel="attachment wp-att-3147" href="http://sharepointmagazine.net/technical/development/sharepoints-branding-limitations-part-3/attachment/wp-header"><img class="alignnone size-full wp-image-3147" src="http://sharepointmagazine.net/wp-content/uploads/2009/04/wp-header.jpg" alt="wp-header" width="494" height="446" /></a></pre>
<pre>.ms-WPHeader td {
     border-bottom:1px solid #4E7CB7;
}</pre>
<p>To style the text of the header, style the<span style="color: #ff6600;"> .ms-WPTitle</span>. Be aware that some web part titles contain a hyperlink. The little arrow is also a link, and to style that you can style the &lt;a&gt;-tag inside the &lt;td&gt;, and then overrule the styling for the header text. Like this:</p>
<pre>/*This styles every link in the header*/
.ms-WPHeader td a{
	background-color:#000000;
}</pre>
<pre>/*This styles every textual link in the header*/
.ms-WPHeader .ms-WPTitle,
.ms-WPHeader .ms-WPTitle a:link,
.ms-WPHeader .ms-WPTitle a:visited{
	color:#4F3B2F;
}</pre>
<pre><img class="alignnone size-full wp-image-2813" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-wph.jpg" alt="wp-wph" width="448" height="256" /></pre>
<p>It is possible to hide the header by changing the settings of the web part. Choose &#8220;appearance&#8221; and in the &#8220;chrome type&#8221; drop down and choose &#8220;none&#8221;. The &lt;tr&gt; with the header will not be rendered then.</p>
<pre><img class="alignnone size-full wp-image-2821" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-chrome.jpg" alt="wp-chrome" width="127" height="107" /></pre>
<h2>Content Editor Web parts</h2>
<p>The &lt;td&gt; of the second &lt;tr&gt; of the<span style="color: #ff6600;"> </span><span style="color: #ff6600;">#MSOZoneCell_WebPartWPQ </span>contains a &lt;div&gt; with a web part ID that has the ID number related to the amount of web parts on the page, like <span style="color: #ff6600;">#WebPartWPQ3</span>. It also has a class called <span style="color: #ff6600;">.ms-WPBody</span>. The core.css uses this class to set the font family and size.</p>
<pre><img class="alignnone size-full wp-image-2822" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-txt.jpg" alt="wp-txt" width="448" height="299" /></pre>
<p>When using a Content Editor Web part, text is placed directly in the <span style="color: #ff6600;">.ms-WPBody</span>. The color of the text is set by the styling in the core.css, on the<span style="color: #ff6600;"> .ms-propertysheet</span> and the body tag. The same goes for the hyper links in the text.</p>
<pre><img class="alignnone size-full wp-image-2823" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-txthyperlink.jpg" alt="wp-txthyperlink" width="544" height="169" /></pre>
<h2>Lists</h2>
<p>In a list web part, there is a <span style="color: #ff6600;">table.ms-summarycustombody</span> class, in where all the links are positioned. Every &lt;td&gt; has a class.</p>
<pre><img class="alignnone size-full wp-image-2829" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-list.jpg" alt="wp-list" width="817" height="488" /></pre>
<p>Depending on what list with hyper links you use, the &lt;td&gt;&#8217;s will have one of the following class:</p>
<pre>.ms-vh,
.ms-vh2,
.ms-vh-icon,
.ms-vh-icon-empty,
.ms-vhImage,
.ms-gb,
.ms-gb2,
.ms-gbload,
.ms-vb,
.ms-vb2,
.ms-vb-tall,
.ms-GRFont,
.ms-vb-user,
table.ms-disc td,
.ms-vh2-nofilter,
.ms-vh2-nograd,
.ms-vh3-nograd,
.ms-vh2-nograd-icon,
.ms-vh2-nofilter-icon,
.ms-pb,
.ms-pb-selected,
.ms-ph {
     font-family:tahoma,sans-serif;
     font-size:8pt;
}</pre>
<p>The first two of this list are for example also used for list headers. Most graphical designs will have the same styling for all hyper links on the portal, so you can add your styling to the above classes and their &lt;a&gt;-tags.  The &#8220;add new&#8221; (add new announcement, add new event, add new link, etc. ) hyper links can be styled with their own class, for example:<span style="color: #ff6600;"> a.ms-addnew</span>. Here&#8217;s an example of how you could style the lists.</p>
<pre><img class="alignnone size-full wp-image-2830" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-linksintxt.jpg" alt="wp-linksintxt" width="262" height="263" /></pre>
<pre><img class="alignnone size-full wp-image-2831" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-linklist.jpg" alt="wp-linklist" width="202" height="131" /></pre>
<h2>Data table</h2>
<p>SharePoint uses tables and lists to display its data. The Document Center is one of those &#8216;data tables&#8217;. The Document Center uses another page layout, because the purpose of the page is to show a big list with data and no text like articles. Therefore the Document Center has one web part zone that uses the whole width of the page.  When styling the web parts, make sure the lists of the Document Center (Documents, Announcements, Tasks) are styled correctly. Pay special attention to the list headers here and make sure the fly outs of the top navigation are positioned above the list headers. If they are, make sure you position the <span style="color: #ff6600;">.ms-vh div</span> and <span style="color: #ff6600;">.ms-vh2 div <span style="color: #000000;">s</span></span><span style="color: #000000;">tati</span>cally.</p>
<pre><img class="alignnone size-full wp-image-2832" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-doccenter.jpg" alt="wp-doccenter" width="718" height="247" /></pre>
<h2>Width</h2>
<p>Sharepoint comes with a set of page layouts. These page layouts have middle and right zones, but they do not always have an ID or class name for those zones. If you want to control the width of the web parts in either the middle or the right column, you need to create new ones, based on the existing page layouts. Make sure every web part zone has an ID or class, so you can set the width of those in the style sheet.</p>
<p><img class="alignnone size-full wp-image-2833" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-setwidth.jpg" alt="wp-setwidth" width="467" height="327" /></p>
<h1>Edit mode</h1>
<p>In edit mode the styling is usually  kept default. Most of the classes and ID&#8217;s of the content are different when in edit mode, so the styling of elements inside web parts is rather easy to separate, but the web parts themselves aren&#8217;t. When editing a page, some web part zones and web parts will get other class.</p>
<pre><img class="alignnone size-full wp-image-2834" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-spzone.jpg" alt="wp-spzone" width="601" height="456" /></pre>
<p>System pages like the &#8220;site settings&#8221;-page and the &#8220;all site content&#8221;-page only contain the same header elements. The rest of the page has classes that are not used on the front-end. Therefore you can style those pages differently. I advise to only change the colors and fonts and leave the layout and the positioning the way it is by default. This way you won&#8217;t corrupt the usability of the system pages.</p>
<pre><img class="alignnone size-full wp-image-2835" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/wp-siteinstellingen.jpg" alt="wp-siteinstellingen" width="400" height="236" /></pre>
<h1>News articles</h1>
<p>When creating a news article, it is possible to choose between several news article layouts; the page layouts. The first page layout for an article page is the &#8220;article page with body only&#8221;. Other page layouts are the &#8220;article page with image on left&#8221;, &#8220;article page with image on right&#8221; and the &#8220;article page with summary links&#8221;.</p>
<h2>Article page with body only</h2>
<p>This page contains a page content zone and a roll up image. When publishing the page, all the content will be inside the <span style="color: #ff6600;">#MSO_ContentTable</span>. Inside that is the <span style="color: #ff6600;">d</span><span style="color: #ff6600;">iv.pageContent</span>.</p>
<pre><img class="alignnone size-full wp-image-2846" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-1.jpg" alt="ap-1" width="669" height="275" /></pre>
<pre><img class="alignnone size-full wp-image-2849" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-1a1.jpg" alt="ap-1a1" width="818" height="356" /></pre>
<p>Since the <span style="color: #ff6600;">d</span><span style="color: #ff6600;">iv.pageContent </span>is an element of every news article page layout, you cannot set the width of the element. Styling this element will cause other page layouts also to be adjusted.</p>
<pre><img class="alignnone size-full wp-image-2848" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-vb1.jpg" alt="ap-vb1" width="329" height="116" /></pre>
<h2>Article page with image on left</h2>
<p>The second page layout is the &#8220;Article page with image on left&#8221;.</p>
<pre><img class="alignnone size-full wp-image-2850" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-2.jpg" alt="ap-2" width="669" height="275" /></pre>
<p>This page layout has the following elements:</p>
<ul>
<li>Page image</li>
<li>Article date</li>
<li>Byline</li>
<li>Page content</li>
<li>Image caption</li>
<li>Roll up image</li>
</ul>
<p><strong>Page image</strong></p>
<p>The <span style="color: #ff6600;">.bodyareaframe</span> contains two tables and some &lt;div&gt;&#8217;s. The first table has the property<span style="color: #ff6600;"> float:left</span>. This makes the image positioned to the left of the text.</p>
<pre><img class="alignnone size-full wp-image-2851" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-2a.jpg" alt="ap-2a" width="816" height="568" /></pre>
<p><strong>Article line and byline</strong></p>
<p><strong></strong>The second table of the <span style="color: #ff6600;">.bodyareaframe </span>is the header. It contains two cells, one for the article date (<span style="color: #ff6600;">.dateLine</span>) and one for the &#8220;byline&#8221;.</p>
<pre><img class="alignnone size-full wp-image-2852" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-2b.jpg" alt="ap-2b" width="428" height="126" /></pre>
<p>Page content</p>
<p>The <span style="color: #ff6600;">di</span><span style="color: #ff6600;">v.pageContent</span> contains a<span style="color: #ff6600;"> div#ctl00_PlaceHolderMain_Content__ControlWrapper_RichHtmlField</span>, which contains the text. The ID is not unique for this piece of page content, it is only unique on this page.</p>
<p>Other page layouts use the same ID, so by styling this element, the text looks the same, no matter what article page layout is chosen.</p>
<pre><img class="alignnone size-full wp-image-2853" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-vb2.jpg" alt="ap-vb2" width="352" height="138" /></pre>
<h2>Article page with image on right</h2>
<p>The &#8220;article page with image on right&#8221; has got the same fields and controls as the &#8220;Article page with image on left&#8221;. The only difference is the floating. Where in the &#8220;Article page with image on left&#8221; the table was floating left, here the table has no floating, but a &lt;div&gt; around it has a right floating. There&#8217;s an extra container div, the<span style="color: #ff6600;"> .articleLayout </span>that was not in the &#8220;Article page with image on left&#8221;.</p>
<pre><img class="alignnone size-full wp-image-2854" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-3.jpg" alt="ap-3" width="669" height="275" /></pre>
<pre><img class="alignnone size-full wp-image-2855" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap3a.jpg" alt="ap3a" width="791" height="587" /></pre>
<pre><img class="alignnone size-full wp-image-2856" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-vb3.jpg" alt="ap-vb3" width="396" height="201" /></pre>
<h2>Article page with summary links</h2>
<p>The &#8220;Article page with summary links&#8221; has, instead of the page image and image caption, a Summary Links control. These links are positioned inside a table that is floated to the right.</p>
<pre><img class="alignnone size-full wp-image-2859" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-4.jpg" alt="ap-4" width="669" height="275" /></pre>
<pre><img class="alignnone size-full wp-image-2858" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-4a.jpg" alt="ap-4a" width="655" height="355" /></pre>
<pre><img class="alignnone size-full wp-image-2857" src="http://sharepointmagazine.net/wp-content/uploads/2009/03/ap-vb4.jpg" alt="ap-vb4" width="270" height="136" /></pre>
<h1>Next time in &#8220;SharePoint&#8217;s Branding Limitations&#8221;</h1>
<p>Next time in part four of &#8220;the Art of SharePoint, how to make a graphical design work for SharePoint&#8221;, I will discuss some design decisions for search pages and the My Site. Other points of interest are the styling of the calendar and date picker and the use of SIFR.</p>
]]></content:encoded>
			<wfw:commentRss>http://sharepointmagazine.net/technical/development/sharepoints-branding-limitations-part-3/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<series:name><![CDATA[Partner Spotlight: Tam Tam]]></series:name>
	</item>
	</channel>
</rss>
