Friday 20 May 2011

Hiding the Quick Launch of SharePoint at the Page Level




how do I hide the Quick Launch for just one page in SharePoint 2010. The answer is simple my friends: Content Editor Web Part with some specialized CSS. Note, this code is written specifically to work with v4.master, any other master page may need different CSS code to hide the Quick Launch.
Edit a page, Site Actions > Edit Page
Click in a wiki text or rich text area and from the ribbon click Insert > Web Part (or add a Web Part to a Web Part zone)
Under Media and Content select Content Editor and click Add



 

With the new Web Part selected, from the ribbon click Format Text > HTML > Edit HTML Source



 

Enter the following HTML / CSS and click OK

<style type="text/css"> body #s4-leftpanel { display: none; } .s4-ca { margin-left: 0px; } </style>


Hide the Web Part chrome by selecting the Web Part and on the ribbon click Web Part Tools Options > Web Part Properties and on the right click Appearance > Chrome Type > None and then click Ok.
Save and close your page and you are done… no Quick Launch!



No comments:

Post a Comment