Hide quick launch in SharePoint Online/2010/2013/2016

This SharePoint customization tutorial, we will discuss how to remove or hide quick launch or left navigation in SharePoint Online or SharePoint 2013/2016. We will also see how to hide quick launch in SharePoint 2010.

We will see how to use CSS, javascript or jQuery to remove quick launch or left navigation in SharePoint Online/2013/2016/2010.

Quick launch bar is a useful feature in SharePoint where you can navigate to different pages easily, but sometimes the client does not want to see that on the left side of the SharePoint page.

We can remove that by using CSS and also we can remove that by modifying the master page.

If you will modify through CSS code, then this is going to be page-specific, mean which page you want to hide, you need to write the CSS code in that page.

Remove Quick Launch in SharePoint

First, we will see, how to remove the quick launch in SharePoint using CSS. We can write the below CSS code in the page using a script editor web part to hide the quick launch bar.

<style>
#sideNavBox { display: none }
</style>

Here sideNavBox is the <div> id of the SharePoint Quick launch bar or left navigation.

Once you put the above code, it will hide the quick launch from the page.

But the content will be in the same place, means there will be space will come in that place. If you want to move the content box a bit left then you can give some margin-left to the content box like below:

<style>
#sideNavBox { display: none }
#contentBox { margin-left: 25px }
</style>

Here contentBox is the id of the Content box.

In which page you want, you can put the above code in the Script editor web part.

Hide Quick Launch in SharePoint (master page)

Rather than putting the code in every page, you can put the code in the master page itself. If you put in the master page, then whatever page inherit the master page, will reflect those changes.

By default Team site uses seattle.master page. Ok here one point, before doing any changes to the master page, please take a backup of the page and then modify on the page.

You can edit the master page using Sharepoint 2013 designer and then put the below code inside the <body> tag.

<style>
#sideNavBox { display: none }
#contentBox { margin-left: 25px }
</style>

Hide quick launch left navigation from home page in SharePoint using jQuery

Recently I got one requirement to hide the left navigation from the SharePoint site home page, but in other pages, the left navigation quick launch should come. And this should be done without using code by using JavaScript or jQuery.

By default left navigation will appear like below:

hide quick launch sharepoint online

We need to add the code by using a Script editor web part.

Open the page where you want to hide the left navigation, edit the page and then from the ribbon click on Add web part and from Media and Content and then select Script Editor web part.

Then put the below code:

<script language="javascript" type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(retrieveListItemsInclude,'sp.js'); 
function retrieveListItemsInclude()
{
document.getElementById("sideNavBox").style.display='none';
}
</script> 

Then Save the page, Now the left navigation will not come like below:

hide quick launch sharepoint 2013

Hide quick launch bar in SharePoint 2010

We can hide the quick launch bar in SharePoint 2010 using CSS. Add the following script to the content editor web part in HTML editor on the page. Remember SharePoint 2010 uses a different master page compared to SharePoint 2013/2016/Online.

<style type="text/css">
#s4-leftpanel
{
display:none;
}
.s4-ca
{
margin-left:0px;
}
</style>

Once, you save the page, the quick launch will not appear on the page.

This SharePoint tutorial, we learned how to remove or hide quick launch or left navigation in SharePoint 2010/2013/2016 or SharePoint Online.

We saw how we can hide quick launch from a specific page as well as from the whole SharePoint site.

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)

envelope
envelope

Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

>