Sunday, October 3, 2010

How to Hide the “Ribbon” in SharePoint 2010


I struggled with this quite a bit before finding a solution that – as near as I can tell – simply hides the ribbon without any real consequences.  Of course, no ribbon means that when in a list or library you can’t do a whole lot.  In my case this requirement was handed down because the particular page we’re doing this in will only contain static content, and the customer wanted to save the screen real estate to make SharePoint look “more like our old version.” 

A frustrating request of course, but nonetheless I imagine many of us in the SharePoint world will come across this request at some point or another. 

After a few other attempts (such as simply deleting the controls in SharePoint Designer, or using different CSS methods and <asp:Panel> controls to set visibility and display properties, I kept getting JavaScript errors on the page, loss of the vertical scroll bar, and other odd behavior.

Here’s the solution I ended up with.  We didn’t want to do this at a site-level, so to do it at a page level we simply modified the appropriate <DIV> tags inline in the ASPX page (using SharePoint Designer):

<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none">

<div id="s4-ribboncont">


noribbon

4 comments:

Unknown said...

After writing this up of course, I didn't find another blog that had a more thorough write-up ...

http://blog.concurrency.com/sharepoint/hide-sharepoint-ribbon

Usman Jan said...

any pointers to hide infopath 2010 ribbon too? I will try, to see, if your solution works there too...
thanks

Emily said...

Usman, any success hiding the infopath 2010 ribbon?

Anonymous said...

Working with Ribbon bar control