.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Branding MySites: fixed width & centered?

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :SharePoint

I'm trying to brand MySites, though finding it very difficult. I tried editing the MySites custom master and default master by the normal way:

1) scroll="no" away from the <body> tag.
2) Rename the s4-workspace ID to s4-workspace-mod.
3) Append these CSS in a CSS file:


body {
overflow:auto !important;
font-size: 8pt;

#s4-workspace-mod {

form {

However in the blank MySite, I noticed that if I select 'Edit page', I get into the page edit state, but the normal 'Page' toolbar in the ribbon doesn't appear. There's just a blank space where it should be. So I cannot e.g. stop editing among other things. I can however add web parts and so on.


My question is, is there any way to brand MySite with fixed width and centering without breaking the functionality?

To make things worse, I can't seem to be able to fix things once I broke them. I tried undoing my changes and resetting the master pages to the Site Default, however it did not fix the Edit page state. Is this broken permanently until a new My Site Host is created or what?

View Complete Post

More Related Resource Links

Fixed Width, Centered, including the ribbon: Any way of getting rid of the 'Add web part' bug that


In making SharePoint 2010 have a fixed width and centered, there's a step of removing or renaming the s4-workspace DIV. We've noticed that the 'Add web part' in edit mode is affected by this, and does not always work correctly. The effect is that it fails to grow to the correct size, therefore sometimes obscuring the buttons for adding the webpart or cancelling the operation.

These are the exact guidelines we've been doing as well:

1. Remove 'scroll="no"' from the <body> tag.
2. Rename or delete the "s4-workspace" ID in the div using that ID.
3. Append an alternate CSS with this content:

body {
	overflow:auto !important;
	font-size: 8pt;

form {

Once we've done these changes, we easily notice that the 'Add web part' button sometimes doesn't enlarge the ribbon properly. Is this normal for SharePoint 2010 pages with fixed width, centered, including the ribbon and returning the vertical scroller to the browser?

Or is there any other way of implementing the changes without getting SharePoint hiccups like this one?

How can I set web parts to always be a specified fixed width and height?

Is that possible? I don't want their size to be changed.

Will it be possible to use fixed width in ListDetails screen upon clicking on the "Edit" button?


Hi All,

I think most of you have noticed that when you click on the "Edit" button in the ListDetails screen, you will see a horizontal scroll bar in your browser becuase a width of fields are increased for edit.

Will it be something that can be controlled in FieldTemplates?

Best regards,

How to Fixed GridViews Header and Footer when scrolling in asp.net?

This article is to show you how to Fix GridView''s Header and Footer in a simple code with CSS and JavaScript

Scrollable GridView with fixed headers in asp.net C# vb.net

In this example i am going to show how to create scrollable GridView with fixed headers which don''t get scrolled with records and stay on the top in asp.net using css, I''ve tested this code on IE7 and Firefox 2.0 , 3.5.

For this we need to add css to headers of gridview to keep them on the top.

First of all place a Panel on the aspx page from thetoolbox. Set height to 200px and width to 200px
and scrollbars to Vertical.
Now add a gridview inside this Panel and set the datasource to populate gridview.

Office Space: Automated SharePoint Site Branding


Here's a custom branding solution for SharePoint sites that integrates Master Pages and CSS files at the level of the site collection.

Ted Pattison

MSDN Magazine July 2008

MySites colleagues update


Running MOSS 2007.  I am having difficulty with the Colleagues webpart within MySites.  Across the organization, I have found multiple users whose Colleagues do not accurately reflect their Organizational Hierarchy, either as it displays in Sharepoint or as it displays in AD.  Imports do not resolve the issue.  The data for these users is accurate in AD, and in their profiles.

While I am aware the webpart allows the user to manipulate their colleagues manually, we do not permit it in our environment.  I would like to find a way to broadly correct the data rather than having to go to each site individually.  So here are my questions:

First, is the colleagues list meant to stay synchronized with the AD hierarchy listings, or is it populated once upon site creation and that's it?
And, depending on that answer, is there any way to force the webpart to synchronize as an administrator?  Or to repopulate the list as if new?

Thanks for your time.

Chapter 4: Branding Your SharePoint Site (Professional Microsoft SharePoint 2007 Development Using M

Learn how to create your own custom site pages and insert Silverlight content into these pages, customize SharePoint lists and views, and insert Silverlight content into existing list views and custom views.

Real World Branding with SharePoint Server 2007 Publishing Sites, Part 1

Learn the essential concepts needed to create an engaging user interface design in SharePoint Server 2007 publishing sites.

Sample: Real World Branding with SharePoint Server 2007 Publishing Sites

Sample code that helps you learn the essential concepts needed to create an engaging user interface design in SharePoint Server 2007 publishing sites.

Schema :relatioship expected & constant/fixed element cannot have attributes

I try to bullkload data from xml file to SQL database ,but I cannot figure out the problem.Please anyone help me .I'd really appreciate. the XML file :  <?xml version="1.0" encoding="UTF-8"?> <root>        <!-- ????? -->        <common>               <!-- UploadDataCenterID???????????????? -->               <UploadDataCenterID>XXXXXX</UploadDataCenterID>               <CreateTime>YYYY-MM-DD HH:MM:SS</CreateTime>        </common>        <data>                 <BuildGroup id="XXXXXXXXXX">                        <BuildGroupBaseInfo operation="N|U">                             <F_BuildGroupName>?????</F_BuildGroupName>                             <F_GroupAliasName>???????</F_GroupAliasName>                             <F_GroupDesc><![CDATA[?????]]></F_GroupDesc>                      </BuildGroupBaseInfo>                      <BuildGroupRelaInfo operation="N|U">                             <F_BuildID>XXXXXXXXXX</F_BuildID>                      </BuildGroupRelaInfo>               </BuildGroup>        </data> </root> then the XSD :<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs

Xml generating in fixed tag format

Hi All!   I have generated xml file from relational database now I want to display all the elements of one category in 1 category tag and I have several categories.   Regards, Mahavir Jadhav  

height of fixed height div appears to vary depending on content

why would text content of a fixed height div with a background image push the background image down and make the div higher? In the following, without the "overflow:hidden;" the div draws with a height > 180px. And the background image starts lower vertically than it does when there is not <h1> text content or when overflow:hidden. Also, when I put a border around the div (  border: 1px solid black ), the background image snaps back up to the top, with the <h1> text overlaying it as I want it to. <div style="background-image:url('images/green city header.png');              background-repeat:no-repeat;       background-position:left bottom;        height: 180px;"><h1>efg</h1></div> The text content is not overflowing. And even if it did, why would overflow text increase the height of a container?Same behavior in IE8 and Chrome. thanks,  

Disk Stripe Width

Since SQL Server uses 64K pages, isn't it MORE advantageous to use a larger stripe width, say, 1MB?  This would allow for multi-page reads. Doc  

CSS Layout Problem when height is fixed to 100%

Hi all,I'm using 3 column DIV layouts for my aspx page which i downloaded it from james tyler website.My problem is when i set height of all the div layers to some 750px it is looking good and when i remove the height, all the DIV layers are getting shortened and looking awakward.I mean if the left menu DIV contains only 3 items, the whole div's height is being reduced to fit those only 3 menu items. I need to maintain 100% height for all DIV layers and my DOCTYPE is XHTML1.0 STRICT. Can anyone please help me out as i'm stuck here.. Here is my CSS and Markup:/* Header styles */ #header { clear:both; float:left; width:100%; } #header { border-bottom:1px solid #57B6DD; } #header p, #header h1, #header h2 { padding:.4em 15px 0 15px; margin:0; } #header ul { clear:left; float:left; width:100%; list-style:none; margin:10px 0 0 0; padding:0; } #header ul li { display:inline; list-style:none; margin:0; padding:0; } #header ul li a { display:block; float:left; margin:0 0 0 1px; padding:3px 10px; text-align:center; background:#eee; color:#000; text-decoration:none; position:relative; left:15px; line-height:1.3em; } #header ul li a:hover { background:#369; color:#fff; } #header ul li a.active, #header ul li a.active:hover { color:#fff; background:#000; font-weight:bold; } #header ul li a span { display:block; } /* 'widths' sub menu */

getting the width of a text

a markup extension for getting the width from the number of characters in a text   public class TextWidthExtension : MarkupExtension { static TextWidthExtension() { try { var culture = CultureInfo.GetCultureInfo("en-us"); var font = Application.Current.TryFindResource("_Font") as FontFamily; var typeface = new Typeface(font, FontStyles.Normal, FontWeights.Normal, new FontStretch()); double fontsize = (double)Application.Current.TryFindResource("_FontSize"); double sum = 0; for (char c = ' '; c <= '~'; c++) { var formattedText = new FormattedText(c.ToString(), culture, FlowDirection.LeftToRight, typeface, fontsize, Brushes.Black); sum += formattedText.WidthIncludingTrailingWhitespace; } AverageWidth = (sum / ('~' - ' ')); typeface = new Typeface(font, FontStyles.Normal, FontWeights.Bold, new FontStretch()); sum = 0; for (char c = ' '; c <= '~'; c++) { var formattedText = new FormattedText(c.ToString(), culture, FlowDirection.LeftToRight, typeface, fontsize, Brushes.Black); sum += formattedText.WidthIncludingTrailingWhitespace; } AverageWidthBold = (sum / ('~' - ' ')); } catch { } }

Does SharePoint support the Full Width Asterisk within urls?

The Full Width Asterisk (U+FF0A) can be entered for folder names in document libraries and file names.  Yet when you attempt to open files with this character, or files in a folder with this character, the url does not resolve. I have tried all of these, but none work. http://server/Shared%20Documents/%EF%BC%8A/Test%20Document.txt http://server/Shared%20Documents/%uFF0A/Test%20Document.txt http://server/Shared%20Documents/*/Test%20Document.txt
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend