Home » Sharepoint 2010

How to set the width of the quick launch bar using style sheet


We have a custom webpart which is used as Quick Lauch on home page in SPS 2003 Site which works fine.

basically it will displays all document libraries,Lists,Picture Libraries,Surveys & Discussion.

Now,we have migrated the Site to MOSS (using DB Migration) and have put the neccessary dlls in the new environment.

In the migrated Site we are able to get all the libraries and lists and even the Quick launch webpart comes fine but the links in poin to http://myserver/sites/Test/#SVRREL#Lists/Customer%20Team%20Vacation%20Schedule/calendar.aspx

instead of http://myserver/sites/Test/Lists/Customer%20Team%20Vacation%20Schedule/calendar.aspx

"#SVRREL#" is getting added before All type of lists

Our Quick Launch user control code looks

<TD style="HEIGHT: 6px"><!--webbot bot="Navigation" S-Btn-Nobr="FALSE" S-Type="sequence" S-Rendering="html" S-Orientation="Vertical" B-Include-Home="FALSE" B-Include-Up="FALSE" U-Page="sid:1004" S-Bar-Pfx="<table border=0 cellpadding=4 cellspacing=0>" S-Bar-Sfx="</table>" S-Btn-Nml="<tr><td><table border=0 cellpadding=0 cellspacing=0><tr><td><img src='_layouts/images/blank.gif' originalAttribute="src" originalPath="_layouts/images/blank.gif" ID='100' alt='Icon' border=0>&amp;nbsp;</td><td valign=top><a ID=onetleftnavbar#LABEL_ID# href='#URL#'>#LABEL#</td></tr></table></td></tr>" originalAttribute="href" originalPath="'#URL#'>#LABEL#</td></tr></table></td></tr>"" S-Target TAG="BODY" startspan --><SharePoint:Navigation LinkBarId="1004" runat="server" ID="Navigation1" /><!--webbot bot="Navigation" endspan --></TD>

We are not able to understand why "#SVRREL#" is added?

Any Suggestions




Hello Guys,

I am in the process of customising Quick Launch menu; I am trying to distinguish Menus and Sub menus using different styles.

Default 'SharePoint:AspMenu' with UseSimpleRendering="true" doesn't give me much flexibility to distinguish menus and submenus.


So I have used the following instead 









  <SharePoint:DelegateControl runat="server" ControlId="QuickLaunchDataSource">


  <asp:SiteMapDataSource SiteMapProvider="SPNavigationProvider" ShowStartingNode="False" id="QuickLaunchSiteMap" StartingNodeUrl="sid:1025" runat="server" />



  <SharePoint:VersionedPlaceHolder UIVersion="3" runat="server">

  <SharePoint:AspMenu id="QuickLaunchMenu" runat="server" DataSourceId="QuickLaunchSiteMap" Orientation="Vertical" StaticDisplayLevels="2" ItemWrap="true" MaximumDynamicDisplayLevels="0" StaticSubMenuIndent="0" SkipLinkText="" CssClass="s4-die">


  <asp:menuitemstyle CssClass="ms-navheader" />

  <asp:menuitemstyle CssClass="ms-navitem" />



  <asp:submenustyle CssClass="ms-navSubMenu1" />

  <asp:submenustyle CssClass="ms-navSubMenu2" />



  <asp:menuitemstyle CssClass="ms-selectednavheader" />

  <asp:menuitemstyle CssClass="ms-selectednav" />




  <SharePoint:VersionedPlaceHolder UIVersion="4" runat="server">

  <SharePoint:AspMenu id="V4QuickLaunchMenu" runat="server" EnableViewState="false" DataSourceId="QuickLaunchSiteMap" Orientation="Vertical" StaticDisplayLevels="2" MaximumDynamicDisplayLevels="0" SkipLinkText="" CssClass="leftNav">


  <asp:menuitemstyle CssClass="leftNav1" />

  <asp:menuitemstyle CssClass="leftNav2" />


  <StaticHoverStyle CssClass="leftNavHover" />

  <StaticSelectedStyle CssClass="leftNavSelected" />

  <DynamicMenuStyle CssClass="leftNavFlyOuts" />

  <DynamicMenuItemStyle CssClass="leftNavFlyOutsItem" />

  <DynamicHoverStyle CssClass="leftNavFlyOutsHover" />





The default settings (for your ref ) :























This is working great; I manage to achieve the look and fell I wanted.

But now when I  am facing a strange problem, the Ribbon control doesn't work any more , In the browser when ever I click on 'Page' option, I am simply getting 'Loading...'  message and nothing happening and I can see 'Error on page' message at the bottom, when I click on the Error I can see the following message

       Error: Sys.ArgumentException: Value must not be null for Controls and Behaviours.
                 Parameter name: element
      Code: 0

I am not sure how to solve this problem any suggestions are much appreciated.

I am using SharePoint Version: 4 (

The above code is from custom master page and i have custom css as well.






Let's say I want to add a link to http://www.google.com in my quicklaunch menu, and that I want to open this link in a new window.
How can I do that ?
When I open the quick launch settings, I can add/modify/delete links but I can only specify the heading/title/url, not the target.
I need this on a single link, not all links.

How can I do this without using SharePoint Designer ?


Hi all,

I am trying to set the width of the quick launch bar to 200px using style sheet. Can anyone tell me how can we set the width of the quick launch bar to 200px using style sheet.


3 Answers Found


Answer 1


Try setting the width to the s4-leftpanel class in CSS.

Let me know if that works


Answer 2

We have to set the fallowing properties


.s4-ca {

BODY #s4-leftpanel {
 WIDTH: 205px; FLOAT: left



Answer 3


Agree with Naveed,

There is a wonderful blog on this. It lists all the parts of the page and how to change the css of it. Will help you in future...


Hope this helps...



We have a MOSS site -team site collection.

I would like to use create project list to setup a few project for our department.
But after I created those project list,they are all displayed in quick lauch bar.
I know i can also choose them not to show on quick launch bar.

But idealy we would like this:

create an item in quick launch bar called Project List. and clicking it, it leads to see all the project lists.
I tried add a heading, and I am not sure what url I should use, I tried:
but it will show all lists including announcement and calendar, I only want to see the project lists I created.

So basically we want a link called Project lists on the quick launch bar, and it leads to a page that shows all project lists. then user can click one of them they want to view it.



I need assistance finding the CSS file or even the CSS that dictates the look and feel of the Quick Launch in SharePoint 2010.  We have used the new theme feature in SharePoint 2010, which creates a secondary corev4.css which lives here: http://server/_catalogs/theme/themed/F4153468/CoreV4-8A0ABD2F.css

I have noted that both ms-quicklaunch and s4-ql are used in css files to manipulate the QuickLaunch.  I've changed these tag properties, and countless others with similar attributes, in all possible css files to no avail (corev4.css, core.css, and the file noted above).  I am trying to get the Quick Launch to delineate the header vs. items in the menu more appropriately by adjusted the font size of each item.  I haven't had any luck.

I was able to add this to my masterpage:

.s4-ql a {
   margin-left:20px;  }

And this creates a margin to the left of the items under the header, creating some navigation separation between the header and the items below.  I can't use this tag to dictate font size properties, however, which is a major need.

So my question is two-fold:

1) What is the CSS that dictates the font size of the Quick Launch?

2) If using anything but the default theme in SharePoint 2010, where is the css file that has the tag for Item #1 above?  (NOTE: I can put the css directly in my masterpage if we can't answer this one, but answering #1 is imperative)


Hi can somebody help please.

I am using Sharepoint Foundation 2010 and I need to use the "navigate function" that you use to have in MOSS 2007.

Basically I want to be able to move lists between different sub headers on the quick launch bar. In MOSS 2007 I use to be able to go into manage site settings and choos "navigate and then move the lists up and down between the sub headers that i created on the quick launch bar.

Anyone got any ideas




Can you tell me how to hide links in quick launch bar for “People and Groups”, “Group”, “All People”?

If a site user click these links all users in site collection will be displayed. (I do want it happends. I only need people for one site only)

If you can show me how to display people in one site only would be perfect.


Where is the setup of the quick launch toolbar stored?

Is it distributed with the MDB/ACCDB file?

I have a quick launch bar on the left with headers that do NOT have URL's and subitems under those headers that are styled differently and that do have URL's (this is all out of the box, and works fine).  My issue is that I have one quick launch item that is a header and that does have a URL associated with it and although the hover style of this item is different than the other link-less headers, I would like to make this one header look different than the others to make it apparent that it's a link without having to hover over it.  Is it possible to do per-item style changes on the quick launch bar or something equivalent?  Thanks

I have posted a question related to this under the heading "how to restrict templates that users can see when creating a new list"

I think a possible solution would be if there was a link on the quick launch bar entitled "Create new Acme List"

I think the requirement for the user to click into lists , clicking create, selecting the correct list template, entering a name etc. will face resistance from some of my users so a link on the quick launch that will bring them straight to the create new list GUI would be helpful.

I look forward to your responses.




HI everyone, I am unsure if I am adding this in the correct thread or not, if not please feel free to re-direct me. We are attempting to use WSS 3.0 as a somewhat interactive intranet. We are trying to remove the "view all site content" menu from the quick launch bar for users who have read only access. Can this be done?

Thank you




Is there any command or admin functionality to change all the quick launch and top link navigation links of all sites in a web application to reference links.

Issue: I have upgraded my wss 3.0 farm to 2010 foundation and it looks most of my quick launch and top link navigation links are pointing to my current production site since it is hardcoded by the users who created it. Now I have to publish the Upgraded sites for testing with a new Test Url and facing the issue of links taking the users to producion site beacuse the links are not reference.


Hello guys please how possible is it to add a webpart zone under the quick launch bar of a SharePoint site without breaking the design of the page?

Hi all ,

We are using a bar chart in this we need to resize the bar width it width was big, we need to make it small,

Any help on this.....?




I'm creating a bar chart report. And the values range from 120 to 36,000. So when I set the Show Data Labels to TRUE , Everything is fine but I can't see the small numbers in their own part of the bar. The labels are showing up  in 2 or more continuous parts of the bar.

So is there a way to set the minimum bar width so that i can see the numbers well? ( I want to see the number 140 completely in its own part of the bar, but 140 is so small when compared to the large value 36000, I can't see 140 in its own part)





I want to Group the menu items in Quick launch with heading like that.

 It is just like Main Menus and Sub menus, Main menu is just a heading , that should not redirect to any page, and Sub menus should have hyperlink.

How to add the heading without the hyperlink in Quick launch bar?



This issue is in MOSS 2007. I have an application that creates SharePoint sites automatically (programmatically). Sites can be created as parent sites or child sites(subsites). If a subsite is created, I have below code that adds subsite link to Quick Launch navigation of its parent site.

int i = 0;

int sitesIndex = 0;


SPNavigationNodeCollection parentNodes = newSubWeb.ParentWeb.Navigation.QuickLaunch;


for (i = 0; i <= (parentNodes.Count - 1); i++)


    if (parentNodes[i].Title == "Sites")


        sitesIndex = i;




SPNavigationNodeCollection childrenNodes = parentNodes[sitesIndex].Children;

SPNavigationNode node = new SPNavigationNode(newSubWeb.Title, newSubWeb.ServerRelativeUrl);



node.Properties["NodeType"] = "Area";


This code is just to show that links are added programmatically. So now, when I decide to move a subsite out of its parent site to the top level (same level as its parent site has) from OOB Site Content and Structure tool (Site Actions), the subsite link in its ex-parent site is not being removed from Quick Launch, though its link URL is changed and is correct. When I go to Modify Navitation settings, I can see that sub-site link and when I hide it and click OK, it doesn't get hidden, still visible in Quick Launch. Has anyone encountered a similar issue like this?

Thank you!


I have a site collection of 15 sites.

5 of them need identical Quick Launch navigation. (The Parent Site is not one of them, unfortunately.)

Is there a way to share the Quick Launch between my 5 sites?



Hi All,

Im new to Sharepoint and we have created a portal. And Im getting a problem with url links of Quick Launch for Sub Sites. should be converted automatically as when i click on a Dept1 link in Quick Launch.

Could you plz let me know that what would be the solution?

Thanks in Advance.

Sateesh Nagalla,



Is there any way i can bind the sharepoint treeview navigation to the same datasource as the quick launch bar?

I'm trying to create a consistent navigation structure within a 4-site deep structure so the quick launch bar is rather clunky to use, but the treeview picks up on document libraries i don't want it to (i only want it to show subsites and pages).


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure