Sometimes you have SharePoint lists or sites where you want to hide the Left hand navigation bar commonly called the Quick Launch. For instance it’s common that people want their News or Announcement lists that the visitor only have read access to, to only show all the news items and not the Quick Launch. Usually, if you have set the permissions correctly this is not a problem from an security point of view because of the Security trimming SharePoint have but it might look better.
There is a verry easy way to hide the Quick Launch if you only want to do this on or two pages.
This is how you do:
1. Go to the site or list where you want to hide the Quick Launch.
2. Go to Site Settings and select Edit Page
3. Add a Content Editor Web Part to any of your Web Part Zones (This web part will be hidden so it doesn’t matter where you put it).
4. Make sure that you select the Hidden attribute for the Web Part and the click on Source Editor…
5. A little bit depending on if it’s on a site, what kind of list, theme and if you have any custom styles on your site the below code could change but it will work in most cases and I will describe how you find make it work in case it doesn’t.
Copy the below code and past it in the Source editor
<style>
.ms-pagetitleareaframe
{
display: none;
}
.ms-navframe
{
display: none;
}
.ms-titleareaframe
{
display: none;
}
</style>
6. Click Save and then Ok in the Web Part Settings frame and finally exit the Editing Mode
7. You should now have a page that does not show the Quick Launch and we have done this by overriding the style sheet. If parts of the navigation is still showing you need to override more attributes and to know which ones I recommend you to use the IE Developer Toolbar.
This IE plugin from Microsoft makes it easy to click on an object on a web site and show what attributes or classes it is using. If you are using IE 6 or 7 you can download it from here: http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en
And if you are running IE 8 which is default in Windows 7 you have it already built in, how to use it can be found here:
http://msdn.microsoft.com/sv-se/library/dd565628(en-us,VS.85).aspx










[...] SharePoint Blog Post From SharePoint Security – Google Blog Search: Usually, if you have set the permissions correctly this is not a problem from an security point [...]
the hide css works great! how do I hide everything but the ListViewWebPart. Would you post the code for the CEWP?
Thanks
Hi,
Good that you find it useful. With hide everything, do you mean that you want to hide top navigation, top area with site logo and all that? I see if I can find the time but it sounds like you should create a new page layout for that instead. Might be more robust.
/Mattias
Billiant – been looking for a way to do this for ages! Your a star – cheers!
Thanks a ton for this solution!
Unfortunately, it leaves a small white box just outside the top right of the area where web parts can be added. Ideally, this area would be dark gray in my case, or whatever the background color of the SharePoint might be. Any suggestions?
Thanks for the solution.
However, the Content WebPart on my SharePoint 2010 is somehow different. It offers another way for me to enter the HTML source code. I was able to enter a Javascript code and found the web part actually works. But it totally ignores the style component you suggested here. The view source after the page rended also indicates that the style component is already embedded in the page content already. Any further help?
The page is in an intranet environment, btw.
I have the same request to see if there is a way ti hide the top site header as well. I tried but even with designer i didnt find anything that will allow me to do this. Basically I have an existing list and one column is a hyperlink that opens another webpart. So, currently I am opening the other list via the link and its showing the top header and I want to be able to click on a link and open a page that shows only the content of the webpart and nothing else, no top, right or left navigation.
Secondly I want to be able to customize the header of the opening Page to reference a column in the webpart (the link thats opening the webpart in another window has embedded filter and now i want to show that filter as a heading when the webpart opens). is this possible?
Excellent, works like a charm. Just what I wanted
This wondeful approach works well in Moss 2007 but in SP 2010, there is no source control in the content editor web part… Does anyone has a new solution to hide teh quick launch areaa???
thanks a lot… It worked