Hiding the left nav or all navigation in SharePoint 2013

Sometimes, you will find the need to hide the left nav on a page in one of your sites.  You could always click the focus on content button, but then you have to unclick to reset for any other page you browse to.

Hiding the left nav took a little more work in MOSS 2007.  You would have to open SharePoint Designer and remove a couple of lines of code.  Well, not anymore!

To accomplish this, go to your page and edit it.  Add a Script Editor web part to any zone on your page.  Add the following script to the web part:

Click Ok, and you’re done!  Now, if you notice, the left margin properties are set to 0px.  You may want to increase to 5px or 10px so that your page is not eating the left hand side of your monitor 🙂

If you want to hide all navigation from your page, use this script instead:

Stay Salty!

3 Replies to “Hiding the left nav or all navigation in SharePoint 2013”

  1. THANK YOU!!!!!!

    What should be so ridiculously simple to do has been a major challenge for me, and your solution is the only one I’ve come across that actually works!

    One thing to note – I did this using a Content Editor Web Part, which I then hid by setting the Chrome to None. I did it this way because, for some reason, I do not have the option to export a Script Editor web part, and I need to use this on all of my pages. Since I’m not an SP admin, I can’t modify the master page, and needed something that let me apply this to each page.

    Thanks again, this is GREATLY appreciated!

  2. Bill, it is the last piece of styling listed in the post. It does say all navigation and not top so I can see where this would not be correct. I’ll change to the name of the post to reflect this.

Leave a Reply