How to hide the ribbon in the sharepoint module, scrollers also do not work

Modal Dialog Options

function Myfunction() { var clientContext = new SP.ClientContext.get_current(); var options = { url: clientContext.get_url() + "/_layouts/Page1.aspx", showMaximized: true, //width: 950, //height: 1000, dialogReturnValueCallback: myCallback }; SP.UI.ModalDialog.showModalDialog(options); return false; } function myCallback(dialogResult, returnValue) { } 

I am trying to hide the tape that goes in the modal box. I have css added below on page1.aspx

 <style type="text/css"> .s4-notdlg { display:none; } 

It hides only part of the Site’s Action and the username that is logged in. I still have a black thick ribbon image on my page. I want the full tape to be hidden. In addition, scroll bars are displayed on the page, but they do not scroll completely to the bottom of the page.

Someone please help me.

+4
source share
2 answers
 body{overflow:auto !important;} #s4-leftpanel { display: none;} .s4-ca {margin-left:0px !important;} #s4-ribbonrow{height:auto !important;min-height:0px !important;} #s4-ribboncont{display:none;} #s4-titlerow{ display:none;} .s4-ba {width:100%; min-height:0px !important;} #s4-workspace{float:left;width:100%; overflow:auto !important;} body #MSO_ContentTable{min-height:0px !important;position:inherit;} 

Use the above css in your page1.aspx

+3
source

In sharepoint 2013, the following CSS worked for me:

 .ms-dialog #s4-ribbonrow { display: none; } 
+1
source

All Articles