HTML Webpart to Hide Quick Launch in SharePoint

I’m currently running a test lab for the purposes of development of a Version 4 Master Page and CSS Stylesheet for SharePoint 2010 to replace the legacy Version 3 UI we are using at work. Whilst developing my flash new fixed width master page and layout I wanted to be able to hide the quick launch on the homepage so that I had the full width of the layout to give the site an eye-catching look.

Using the HTML Webpart we are able to inject some inline CSS Styles which do this for us.

Add the HTML Webpart anywhere on the page that you want to hide the Quick Launch on and add the following source code to it:

<style type=”text/css”>
/* Hide Quick Launch on Homepage */
#s4-leftpanel {
display:none;
}
.s4-ca {
margin-left:0px;
}
</style>

Make sure you configure the Webpart as Modeless so that the users don’t see the title of what is essentially a blank Webpart shown in the interface, and that’s it.

richardjgreen

Richard works as a Cloud Consultant for Fordway Solution where his primary focus is to help customers understand, adopt and develop with Microsoft Azure, Office 365 and System Center. Richard Green is an IT Pro with over 15 years' of experience in all things Microsoft including System Center and Office 365. He has previously worked as a System Center consultant and as an internal solutions architect across many verticals. Outside of work, he loves motorbikes and is part of the orange army, marshaling for NGRRC, British Superbikes and MotoGP. He is also an Assistant Cub Scout Leader.