Search This Blog

Wednesday, 22 April 2015

Hide Top Bar, Ribbon, Quick Launch in SharePoint

  •  Create a CSS file named (for example) Sample.css in the Style Library as follows
<style type="text/css">
/* Resizes to 0 the upper margin of the main area */
.ms-pagetitleareaframe table { background: none; }
/* Hides the left navigation area (quick launch bar) */
#s4-leftpanel-content { display:none !important; }
/* Resizes to 0 the left margin */
.s4-ca { margin-left:0px !important; margin-right:0px !important; }
/* Hides title and breadcrumb bar */
.s4-title { display:none !important; }
/* Hides the top navigation links */   
.s4-tn { display:none !important; }
/* Hides the top navigation container bar */
.s4-notdlg { display:none !important; }
/* Hides the search box */
#SRSB { display:none !important; }
/* Hides the help button */   
.s4-help { visibility: hidden; }
/* Hides user name in the top right corner and the related menu */   
.s4-trc-container-menu { visibility: hidden; }
/* Hides the ribbon */
.ms-cui-ribbonTopBars{ display:none; }  body #s4-ribbonrow { min-height: 0 !important; display:none !important; }
</style>
  • link the CSS file in the desired master page by adding this line:
<link href="/Style%20Library/Sample.css" rel="stylesheet" type="text/css" />
just above this line: <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>

No comments:

Post a Comment