Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Hides the Quick Launch on a SharePoint 2013 or O365 Team Site or Blog site
<style type="text/css">
#sideNavBox {
display: none;
}
#contentBox {
margin-left: 36px;
margin-right: 36px;
}
.ms-fullscreenmode #contentBox
{
margin-left: 0px;
}
div.welcome-content {
display: none;
}
</style>
Owner

jamesnotjim commented Aug 4, 2016 edited

Hide Quick Launch

A bit of CSS to hide the Quick Launch (i.e. left navigation menu) on SharePoint 2013 and O365 sites. Just add a Script Editor Web Part to any zone of your page and insert this code. For convenience, I tend to rename the Script Editor Web Part "CSS."

Scope

Works for Team Sites and Blog sites on SharePoint 2013 and O365. Works on Publishing Sites that use the "Blank Web Part page layout." May work on others as well. Probably works on any layout with zone to which you can add Web Parts.

Customization

Adjust the #contentBox margin-left attribute (set to 0px, in the example) to add left margin, if your content ends up being too close to the left edge of the screen.

Recent Changes

Added a display:none for div.welcome-content, which takes up space across the top of some pages (between the SharePoint logo and the first Web Part zone). If you use .welcome-content in your designs, you'll need to remove that bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment