.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

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

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

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?

View Complete Post

More Related Resource Links

Branding MySites: fixed width & centered?


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?

How to hide the list ribbon in XSLT List View Web Part?

Hi, In SharePoint 2010, I have a custom list "Clients" on a site. On the home page of the site, I have added a Clients List Web Part. When I access the home page in a browser and click anywhere in that list, it displays the "List Tool" ribbon group which has "Items" and "List" ribbons. I do NOT want these ribbons at all when clicking on the list. How do I achieve this? Should I disable the click event on the list so these ribbons do NOT appear? How do I disable the click event on the list? Or What should I do to hide these ribbons when clicking on the list? Basically I want it to behave same as content query web part. In content query web part, if you click anywhere in it, it doesn't show up any extra ribbons. I want the same behavior with list web part. Thanks, Hitesh

Web Part on View Form Hides Ribbon

If I add a web part to a list or document library view for - say 'AllItems.aspx', the 'Library Tools' ribbon section is hidden.  Is this intended behavior or is there some configuration setting I am missing? To reproduce: Create a new Document Library Edit the default 'AllItems.aspx' view page Add a web part (any WP seems to do it) Exit edit mode Only the 'Browse' tab is now available

Including a WebService in a Web Part - how to reference it?


Hi all,

I've created a Web Part using the SP 2010 template in VS 2010.  Also in this project, I added a web service (under WebServices/ProjectName) called TestService.asmx.  I would like to call this web service from JavaScript from my web part, but I can't figure out the correct parameters for the ScriptManager.  What I currently have in my Web Part User Control is:

<asp:ScriptManagerProxy runat="server">
        <asp:ServiceReference Path="/WebServices/VisualWebPartProject2/TestService.asmx" />

The path is not right - it returns a 404 error and the service definition does not get loaded into the page.  What is the right path?  The service gets deployed to "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\VisualWebPartProject2".




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.

How to hidde Web part group from ribbon in a publishing and wiki pages?



I want to hide Webpart group for users with special permmision.

I have created this custom action

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   Location="CommandUI.Ribbon" Rights="ManageWeb">
          Location="Ribbon.EditingTools.CPInsert.WebParts" />


But when I do edit page->insert I still have this group.

Can you help me?



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,

Web Part Error: "The Height and Width properties do not ..."


I,ve made a asp webpart based on two datagridviews, a textbox and a button. It works fine under asp.net, but when deployed under MOSS2007 it shows the textbox and button.

When the button is pushed (with a search argument) the following error apears.

Web Part Error: The Height and Width properties do not support proportional metrics (for example, 20%).

Can anyone tell me what this means?




WSS3.0 - Survey Web Part Graphical Summary Width


Good morning,

I am currently exploring the use of Sharepoint 3.0 in our environment and have been running through the evaluation guide.  I created a Survey and added the web part to the right side of the main page using the Graphical Summary view.  The column width appears to hold firm at 375pt and the adjustment through modifying the Web Part doesn't have any effect.  How can I go about narrowing this web part so that it lines up with the rest of my right side content?  Any help is most appreciated.

Thank you,

WPF: If Heineken did MVVM Frameworks Part 4

MVVM is to have an instance of a particular Model (say currentPerson) inside my ViewModel (say PeopleViewModel) which is exposed to the View (say PeopleView). The View binds and edits the Model directly.

This definitely flies in the face of what most people consider to be the holy grail of MVVM pattern, but it's a fairly new pattern, so people are still finding their way with it every day, and this works for me very well. The reason I do what I do, is for the following reasons:

1.I have always had the luxury of being able to write my own UI specific Model classes. I would even do this if I was using some other Model classes first, such as LINQ to SQL or LINQ to Entity Framework. As these classes don't have everything a proper WPF Model class needs in my humble opinion. Though, they are pretty good, as they are Partial classes and use INotifyPropertyChanged/DataContract etc etc
2.I am a pragmatist and I do not like writing code for the sake of writing code. I have seen some MVVM apps where the author has had a Model with 50 properties on it, that are simply repeated in the ViewModel abstraction, where the ViewModel added nothing. On that day I decided I would never do that unless I have to.
3.I honestly see no harm in writing directly to the Model from the View, JUST SO LONG AS if the Model is InValid its data NEVER makes its way to the database. I honestly see no pro

Building Layered Web Applications with Microsoft ASP.NET 2.0 - Part 1

"Building Layered Web Applications" that shows you how to build N-Layer applications with Microsoft ASP.NET 2.0. These articles teach you how to design, build and use custom business objects in your web application. The target audience for this series are developers that are ready to make the switch from using SqlDataSource controls to ObjectDataSource controls with custom business objects. Experience with ASP.NET 2 and C# is necessary while some knowledge about object oriented design certainly helps. The design I am going to show you in these articles is a simplified version of a design you would use in a real world application. It doesn't feature all the necessary functionality your application needs, but instead focuses on the underlying concepts.

Hello World to C# Threading Part 1

In this post we will see how we can implement simple threading. Why do we need threading? When you want you application to do more then one thing at same time, then you need to implement threading. One usual and common scenario would be when your application needs to get data from some other resource like web services and you don't want you application GUI to be freeze during this time. In that sort of case you will run the code to access web services in separate thread so your application GUI won't freeze. The System.Threading namespace .NET provide interfaces to implement multi threading.

Multithreading in .NET Applications, Part 3

Multithreading is a powerful design tool for creating high-performance applications, especially those that require user interaction. Microsoft .NET has broken down the barriers that once existed in creating multithreaded applications. The last two installments of the .NET Nuts & Bolts column were

What's new in ASP.NET 4.0 - Part II - Routing in Webforms

This post covers one such feature which is Routing in Webforms. Although Routing was available even in .NET 3.5 SP1, (check this excellent post by Phil Haack on implementing Routing in ASP.NET 3.5 with .NET 3.5 SP1), it was kind of less known. Also the plumbing work was too much for getting it implemented.

C# 3.0 new Features - Part 1

This article give you a brief description on the new features of C# 3.0 and make our life easier.

C# 3.0 new Features - Part 2

This articles describes the importance of Lambda Expressions.
This will reduce number of steps of code writing.

Application Architecture: An N-Tier Approach - Part 1


Free Trial: SQL Backup Pro
Sponsored by Red Gate
Exceptional DBAs make the most of their office hours. That's why they love Red Gate SQL Backup Pro. Its faster, smaller, secure SQL Server backups mean more time spare to accomplish more tasks and professional training. Make time to be an Exceptional DBA. Download it now! »

Free Trial: SQL Toolbelt
Sponsored by Red Gate
The SQL Toolbelt is a set of twelve powerful and intuitive tools that will help you burn through SQL Server chores with astonishing speed and accuracy. Download it now! »

Download: SQL Backup Evaluation Center
Sponsored by Red Gate
Download the T-SQL scripts in the SQL Backup Evaluation Center to compare Red Gate SQL Backup Pro's compressed backups with the size of backups created using native SQL Server. Download it now! »

Autodesk Inventor®
Go Beyond 3D To Digital Prototyping With Autodesk Inventor. Learn How.
Virtualization Solutions
Optimize, Simplify, & Save Today. Learn About Microsoft Solutions.
Microsoft SQL Server® 2008 - Free Trial
Download the Free 180-day Trial of SQL Server® 2008 Enterprise Edition!
Hot Careers in Internet Marketing
Get prepared for your new career with online degrees from Full Sail University!
Microsoft Te
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