Wednesday, May 15, 2013

Add Custom CSS to your SharePoint MasterPage

As often it happens, we have to customize the look-n-feel of the v4.master to achieve the styles as expected by customer. At this point, we end up designing a custom CSS and then associate it within the MasterPage. The steps for doing that are explained below:

  • Use an SP2010 control called cssregistration and add a line below the existing csslink:
  • Existing line: runat="server" Version="4" />
  • Now, add the above mentioned control by putting the line: ="server" name="/Style%20Library/Scripts/style.css" After="coreV4.css" />

What this does is basically it tells the SharePoint to load your custom CSS after the load of the default Corev4.css. This way your styles will supersede the default styles.

No comments:


Related Posts with Thumbnails