Thursday, July 5, 2007

Adding a CSS File Link to a MasterPage

Use the following to add a reference to a stylesheet in a WCM publishing site's Style Library document library:

    <SharePointWebControls:CssRegistration ID="CssRegistration1" 
      name
="<% $SPUrl:~sitecollection/Style Library/style.css %>"
       runat="server"/>

Note that some of the default styles may still override those in the referenced stylesheet, so you may need to add the CSS as the Alternative CSS URL on the "Site Master Page Settings" form

No comments: