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!