Friday, October 28, 2011

Removing the left-hand navigation in SharePoint 2010

When designing the layout and branding for new SharePoint 2010 sites, some people may wish to hide the left-hand navigation and only use top navigation. Hiding the left-hand navigation allows for more space for content and a possible cleaner looking interface. In SharePoint’s Site Settings, you can turn off the quick launch and tree view, however that still leaves the navigation bar on the page with only a recycling bin. In order to entirely remove the bar, you would need to either modify the master page or CSS linked to the master page.
In SharePoint 2010, this can be done pretty easily in the CSS file by modifying the following two


styles.#s4-leftpanel { display:none; }



That style controls the left navigation panel, and setting the display to none effectively hides the entire section. Hiding this section is not enough though, since the body area uses a left margin to specify where to start the body section. So you would also need to modify the following style, to tell the body area to start at 5 pixels from the left, or wherever you want to start the main


area..s4-ca { margin-left: 5px; background: transparent; }


Originally from http://blogs.kraftkennedy.com/index.php/2010/04/21/removing-the-left-hand-navigation-in-sharepoint-2010/