Skip to main content
edited tags; edited title
Link
Benny Skogberg
  • 25.5k
  • 12
  • 68
  • 163

Add css to masterpage (sharepointSharePoint Online/Office 365)

added 6 characters in body
Source Link

I have a css to hide list search box on document libraries. It's in the SiteAssets library.

I can edit a document library view and add Content Editor webpart and add css reference and able to hide.

However, I added following code to masterterpage after core.css but it doesn't fire. Any idea why?

<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/SiteAssets/hideSearchBox.css%>" runat="server"  After="corev15.css" />

The css is


The css is 

<style>
.ms-inlinesearch-divbaseline{ display: none !important;}
</style>

I have a css to hide list search box on document libraries. It's in the SiteAssets library.

I can edit a document library view and add Content Editor webpart and add css reference and able to hide.

However, I added following code to masterterpage after core.css but it doesn't fire. Any idea why?

<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/SiteAssets/hideSearchBox.css%>" runat="server"/>

The css is

<style>
.ms-inlinesearch-divbaseline{ display: none !important;}
</style>

I have a css to hide list search box on document libraries. It's in the SiteAssets library.

I can edit a document library view and add Content Editor webpart and add css reference and able to hide.

However, I added following code to masterterpage after core.css but it doesn't fire. Any idea why?

<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/SiteAssets/hideSearchBox.css%>" runat="server"  After="corev15.css" />

The css is 

<style>
.ms-inlinesearch-divbaseline{ display: none !important;}
</style>
added 52 characters in body
Source Link
Robert Lindgren
  • 24.5k
  • 12
  • 53
  • 79

I have a css to hide list search box on document libraries. ItsIt's in the SiteAssets library. 

I can edit a document library view and add cewpContent Editor webpart and add css reference and able to hide. 

However, I added following code to masterterpage after core.csscore.css but it doesntdoesn't fire. anyAny idea why?

<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/SiteAssets/hideSearchBox.css%>" runat="server"/>

<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/SiteAssets/hideSearchBox.css%>" runat="server"/>

The css is

.ms-inlinesearch-divbaseline{ display: none !important;}
<style>
.ms-inlinesearch-divbaseline{ display: none !important;}
</style>

I have a css to hide list search box on document libraries. Its in the SiteAssets library. I can edit a document library view and add cewp and add css reference and able to hide. However, I added following code to masterterpage after core.css but it doesnt fire. any idea?

<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/SiteAssets/hideSearchBox.css%>" runat="server"/>

The css is

.ms-inlinesearch-divbaseline{ display: none !important;}

I have a css to hide list search box on document libraries. It's in the SiteAssets library. 

I can edit a document library view and add Content Editor webpart and add css reference and able to hide. 

However, I added following code to masterterpage after core.css but it doesn't fire. Any idea why?

<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/SiteAssets/hideSearchBox.css%>" runat="server"/>

The css is

<style>
.ms-inlinesearch-divbaseline{ display: none !important;}
</style>
added 1 character in body
Source Link
Loading
Source Link
Loading