Hide Quick Launch menu items from site in SharePoint 2010

Background

There is no Out Of Box(OOB) feature to hide the quick launch menu items or tree view navigation in SharePoint site.

Problem

Let’s assume that you have created a intranet site for your organization and you want that all users should view that site in full width mode. As you have lot of tabular content on it. How to go about it?

Solution

Let’s a assume that you have created a team site.

default site

default site

Next thing you have to do is edit this page and add content editor web part

Add web part

Add web part

Click on “Add a Web Part” and select “Media and Content” in the categories section and then select “Content Editor” in WebParts section and then click on add button(as it is highlighted).

add content editor webpart

add content editor webpart

Now you just have to paste the following code in web part

Go to Editing Options ribbon menu, select Html DropDown button in Markup menu item and then select “Edit HTML Source”

Edit HTML Source

Edit HTML Source

and paste the below code in it.

content style code

content style code

<style type="text/css">

/*--Hide Quick Launch --*/
#s4-leftpanel{
display:none
}
.s4-ca{
margin-left:0px
}

</style>

And now you can see that there is no quick launch menu items 🙂

Quick launch hidden

Quick launch hidden

Conclusion

Most of the times old tricks works 😉

Tagged with: ,
  • joe

    There is a setting under site settings that allows you to hide or show the quicklaunch (left navigation) with just a check box. Much easier.