Abhishek Bhowmick | SharePoint Blog

Hide left navigation on OOB SharePoint masterpage

Posted in Sharepoint by Abhishek Bhowmick on June 29, 2011

I have often heard users saying they do not prefer losing space with that left navigation on SharePoint pages. Well, you can just remove it OOB:

SharePoint 2007 default.master:

Add a Content Editor Web Part to the page where you would not like the left navigation to show and add the code below and apply changes.

<style>.ms-navframe{ display:none; }</style>

SharePoint 2010 v4.master:

Add a Content Editor Web Part to the page where you would not like the left navigation to show and add the following to the HTML Source.

<Style>
body #s4-leftpanel
{
display: none;
}
.s4-ca
{
margin-left: 0px;
}
</style>

The CSS above hides the left navigation Div, and then sets the content area to not have a left margin. Hope this helps!

Advertisement

One Response

Subscribe to comments with RSS.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.