简体   繁体   中英

Applying custom css to default theme in sharepoint 2010

I have created a custom styles css and registered it as follows in v4.master using SharePoint:CssRegistration option name="<% $SPUrl:~SiteCollection/Style ibrary/Custom.css%>" after="corev4.css" runat="server"/>

I assumed that my custom styling would be applied to any new site, however any new sites open in the standard default style, obviously I want my custom branding to automatically apply..

I have to mess around in site settings to use the parent theme etc, but even that does not always apply the styles correctly, so I have to go to the parent site and apply the parent styling to substitutes etc.

Other users will be using the site so I want to make it as easy as possible, can anyone offer help?

In order to apply your custom styles & master pages, you need to create sharepoint module (your styles, files & configuration) and Feature with Event receiver(when activated in sharepoint site/sitecollection, it'll apply your module, when deactivated, it rollback default settings related to styles/master page).

Here is the step-by-step article,

Article 1

Article 2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM