SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can this be done with SharePoint Online?

Failing that, for an entire site?


share|improve this question

Create a JS file (HideScript.js) and paste the following code in it, which hides the ribbon for a certain page. Upload the JS file to some document library for e.g. "SiteAssets"

function HideRibbon() {


   var newHeight = $(document).height();

   if ($.browser.msie) {newHeight = newHeight - 3; }




Refer the JS in your page layout(for which you would like to hide ribbon) like this:

<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server">

<asp:literal ID="Literal6" runat="server" Text="&lt;script src='" />
<asp:literal ID="Literal7" runat="server" Text="<% $SPUrl:~site/SiteAssets/jquery-1.8.0.min.js %>" />
<asp:literal ID="Literal8" runat="server" Text="' type='text/javascript' &gt;&lt;/script&gt;" />

<asp:literal ID="Literal1" runat="server" Text="&lt;script src='" />
<asp:literal ID="Literal2" runat="server" Text="<% $SPUrl:~site/SiteAssets/HideScript.js %>" />
<asp:literal ID="Literal3" runat="server" Text="' type='text/javascript' &gt;&lt;/script&gt;" />


Update: with CSS it's just



 display: none;


Happy SharePointing!

share|improve this answer
Nice one bro, thanks for sharing :) ! – Muhammad Raja Jan 7 '13 at 23:09
Does this definitely work in SharePoint Online? When I edit the page in question with SharePoint Designer, I can see the start and end tags for the ContentPlaceHolder, but no literals. And I am unable to chnage the html at all. Thanks. – finisterre Jan 9 '13 at 15:10
Aha, so ADVANCED MODE allows me to edit. So I've added those 3 lines, and saved, but no effect. – finisterre Jan 9 '13 at 15:26
have your uploaded/loaded jquery-1.8.0.min.js file before running script? See my updated scripts – Falak Mahmood Jan 9 '13 at 17:40
Falak. That works. But it turns off the top (smaller) blue bar and leaves the bottom (larger) grey bar. I was hoping to leave to top blue bar with 'Site Actions' etc. and turn off the big grey bar (where the edit icons etc. live). Do you know if this is possible? Thanks. – finisterre Jan 9 '13 at 18:21

This is possible and there are many tuts on this, if you dont want to produce a custom solution than i highly recommend using this tool,

With this solution you can on each site define if the ribbon is display or not for :


Anonymous user for one or many

specific SharePoint groups


set s4-ribbonrow to none (could use feature to performe this ;))

Happy coding ;)

share|improve this answer

As far as I know Ribbon is part of SharePoint Master Page, hiding it on a certain page isn't possible rather its SharePoint 2010 or SharePoint online.

Now there might be some hack available but I am not aware of one.

Hope it helps.

share|improve this answer
I marked this down due to answer is missleading! – ali Sharepoint Jan 8 '13 at 0:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.