Friday, December 30, 2016

Hide components located on the SharePoint Online master page, oslo.master

In order to hide various components located on the oslo.master master page of SharePoint Online site, a brutally simple solution is to insert a Script Editor web part on the web page and add one or more of the following CSS elements to it:

<style>

     .ms-srch-sb {display:none;}

     .ms-core-pageTitle {display:none;}

     #pageContentTitle { display:none;}

     #titlerow { display:none;}

</style>

Just a quick warning, placing all of these CSS elements on the web page is going to turn the web page into a blank page (that is, if you don't have any content on it) so feel free to remove any of those CSS elements listed above if you want that component to be displayed.

Here is a key that explain which element removes which control:

.ms-srch-sb {display:none;} - removes just the Search control
.ms-core-pageTitle {display:none;} - removes just the Page Title
#pageContentTitle { display:none;} - removes just the Site Title
#titlerow { display:none;} - removes the Site Logo, Site Title, and Search Control