Search
Close this search box.

How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010?

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.

This article is part of the GWB Archives. Original Author: Sharep10nt

Related Posts