Forum Discussion
Asesh Kumar Maity
Feb 22, 2019Brass Contributor
Trying to Hide the Site Header of a communication site
Hi Experts,
I have the requirement to hide the Site Header portion f a SharePoint Communication site.
We can do the same by applying the css "mainRow-xx{ display:none;"} in the application customizer.
But it is not recommended by the Microsoft and also it is not applicable to all the pages of te site collection.
Can we find the main control of the site header as Object (not css class name, control class name) in the page. So that in the Application customizer we can get the Object and if the object contains the property of visible.
Appreciate your help.
Hi Asesh Kumar Maity as you say, It’s not recommended to trim the ribbon or suite bar.
Btw, you can realize a spfx webpart which include css or js (something like this https://spwestpros.blogspot.com/2017/10/hide-sharepoint-quicklaunch-on-modern.html ) or use this Modern Script Editor Webpart https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor
Cheers,
Federico
Hi Asesh Kumar Maity as you say, It’s not recommended to trim the ribbon or suite bar.
Btw, you can realize a spfx webpart which include css or js (something like this https://spwestpros.blogspot.com/2017/10/hide-sharepoint-quicklaunch-on-modern.html ) or use this Modern Script Editor Webpart https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor
Cheers,
Federico