Sharep10nt

All About SharePoint 2010/2013

  Home  |   Contact  |   Syndication    |   Login
  23 Posts | 0 Stories | 0 Trackbacks

News

Exploring SharePoint 2013 Online

Developing Nintex Workflows

Exploring SharePoint 2013

Acquired MCPD : SharePoint 2010 Developer

Share on Facebook

Archives

Post Categories

Top Bar, Ribbon, Quick Launch are come up with Application Pages by default. If you want to open the page in Dialog Framework then those elements will take more space and make the layout cluttered. You can remove these elements by creating new page layout which is cumbersome/time consuming.

One way to hide these controls is by passing a Parameter with the URL. [ ?IsDlg=1 ] SharePoint will hide these elements when It gets IsDlg Parameter on URL.

But every time we can't pass these parameters. Then how to get rid of these elements?

Simple Just add the below css Code in Application Page under PlaceHolderMain section.

<style type="text/css">

    #s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, #s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content {display:none !important;}

    .s4-ca{margin-left:0px !important; margin-right:0px !important;}

</style>

This will hide the elements and only the content will be shown.

Note : If you use this code in SharePoint Site Pages with Content Editor Webpart then you can't check in the page since the toolbar goes hidden.

If you still want to use this code on Site Pages then add Content Editor Webpart and paste the above code. When you want to make other changes then open the page in browser with parameters [ ?Contents=1 ] which opens the page in WebPart maintenance mode. Remove the content editor webpart and re-open the page. Make the changes and add content editor webpart at last along the CSS Code. To check in the page use Site Pages Library.

posted on Wednesday, November 17, 2010 5:00 PM

Feedback

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 1/26/2011 9:15 PM Roland de Goeij
Hi there, thanks for your awesome trick, it really helped me out.

But i really do not want to hide not all of the components but just the left navbar (quick launch and all site content) and keep the ribbon.
(i have a script that automatically hides the ribbon for anonymous users)

so i tweaked around a little with your scfript to keep everything but the quick launch and all sitre content but i cant get it too work :(

Can you help me out ?

Thanks a bunch!
Roland de Goeij

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 1/27/2011 9:04 AM Venkatesh R
Hi Roland,
In the CSS specify only the elements which you want to hide. To find the elements you can use IE 8 Developer Tools or Google Chrome (Right Click on required element and select "Inspect Element").

Refer :
http://geekswithblogs.net/venkatx5/archive/2010/11/24/how-to-change-look-and-feel-of-sharepoint-2010-sites.aspx

Revert if you still not able to fix.

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 1/27/2011 1:27 PM Roland de Goeij
Hi, thank you for your quick reply!

I was wondering.
Can i do this trick also in the masterpage ?

Greetz. roland.

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 1/27/2011 1:30 PM Venkatesh R
Yes. You can add it in Custom CSS File and add it in Master Page. It'll Work.

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 3/27/2011 4:09 PM pranit
hi venkat,
i am opening an article page within modal dialog. i am using this code below to hide the status bar with in dialog
#pageStatusBar{display: none !important;}

but its not picking in the modal dialog. this is publishing site.

any help will be appreciated.

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 3/28/2011 9:34 AM Venkatesh R
Hi Pranit,
Instead of "#pageStatusBar" use ".s4-status-s1". When the element tag has "Class" property then use it. Use "id" only when "class" not available.

To find the elements you can use IE 8 Developer Tools or Google Chrome (Right Click on required element and select "Inspect Element").

Refer :
http://geekswithblogs.net/venkatx5/archive/2010/11/24/how-to-change-look-and-feel-of-sharepoint-2010-sites.aspx

Hope It Helps!

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 3/28/2011 10:34 AM pranit
when i do inspect element for status bar in modal dialog its
id="pagestatusbar" class=".s4-status-s3" non of my master page has id="pagestatusbar" class=".s4-status-s3" it has id="pagestatusbar" class=".s4-status-s1" instead. So where is this id="pagestatusbar" class=".s4-status-s1" coming from ?

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 3/28/2011 10:36 AM pranit
i mean where is this id="pagestatusbar" class=".s4-status-s3" comin from?

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 3/28/2011 10:56 AM Venkatesh R
As I specified please find the status bar id, class elements via Chrome or IE Dev Toolbar. Use the class name in CSS.

Note: In CSS the class has . whereas it should not be in Tag. ( ie. To specify css for <div class="className"> the CSS should be <Style> .className{}</Style> In css the classname should have prefix dot(.). If you are not clear about CSS then please visit http://www.w3schools.com/css/css_id_class.asp

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 7/10/2011 2:12 PM Muhammad Adeel
Thanks man. you saved my time.

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 8/30/2011 1:11 PM Mike
very nice and straigtforward explanation!

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 9/18/2011 8:40 PM Roberto Tonon
If don't work, try to put the code on
<asp:Content ContentPlaceHolderId="PlaceHolderTitleAreaClass" runat="server">

Bye

Roberto Tonon
info@websharepoint.it
www.websharepoint.it

# quick launchbar missing in settings.aspx page . 1/22/2012 8:08 PM chowdary.BVS
Hi i migrated my site from moss2007 to sharepoint 2010.but look n feel look like moss2007 only.
in home page quick launch bar is visible.but in all application pages(_layouts/seetings.aspx)quicklaunch bar missing.i enabled the quick launch bar (in sitesetting-->tree-->enablequick launch)also.
i find out by using Developer tool that the quick launch css not rendering.
please help me what i have to do to solve this issue.

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 2/20/2012 1:42 PM Mahmoud Algoul
Nice trick, one question, Every time I need to edit the page I have to remove the CSS code to see the ribbon, is there is a way to solve it.\

thanks

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 3/2/2012 7:38 PM getting rid of belly fat
The real problem is fighting something for hours (and hours and hours) to realize that it was some sort of security that you didn't have. So I open my dev box up completely (it's a VPC anyway -- natted so noone can get to it.) Then I go back and tighten things up after I'm done with development. I look at CAS as an implementation detail that has to be done just like creating a CAB file, MSI, documentation, etc.

Just my perspective ...

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 9/24/2012 5:16 PM Deewaker
user securitytrimmed control in master page which allows ribbon to be visible based on user permission. you may also use loginview control if you want to hide ribbon from anonymous users.

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 3/21/2013 3:49 PM JUSTCURIOUS
hOW TO HIDE THE 'ATTACH FILE' ACTION MENU IN THE RIBBON

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 5/7/2013 11:51 PM Kamala
This is not working for me. Please let me know where should I place this code in Designer exactly.

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 5/8/2013 12:50 AM Venkatesh R
@Kamala : Download the Application page, open it with Simple Editor(Ie. Notepad). Search for "PlaceHolderMain" and paste the given CSS. Save the file and upload it on the site. Check in the page in respective pages library and view the page. It should display without ribbon, quicklaunch bar.

I used it and it's working. Please revert if you are using any custom masterpage.

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 5/29/2013 4:37 PM Abhishek
Great work

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 8/16/2013 5:27 PM Manish
Thanks! That is just perfect. Guys if you have spent enough time searching for scripts/css to achieve this, you may relax now. this post will end your search.

# ribbon not coming 8/21/2013 12:27 AM deepthi naidu
hi guys,
i have a one issue in my work..i have migrated my project sharepoint 2007 to 2010.every thing i attached correctly..but the thing is we are using sharepoint 2007 master page..after migrating 2010..when ever i open the page in edit mode..add web parts links are coming..but the thing is when i clicked that link....the web part gallery are not coming..means ribbon are not coming..can u help me plz guys..

thanks in advance...

# re: How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010? 12/17/2013 11:35 PM Venkatesh R
Hi,
In Google Chrome, view source (or right click -> Inspect element for Developer tools) check the web part gallery content loaded(Ie. Code available). If yes then it can be fixed via CSS. Otherwise we need to check the Server side code of the page/master page/usercontrols.

-Regards,
Venkatesh

# re: How to Hide Top naviagation only for anonymous users in SharePoint 2013? 5/2/2014 12:05 PM alaya
Hi,
How to hide top navigation particular menus only for anonymous users?

Regards
Alaya

comments powered by Disqus