Hari
Hari

Reputation: 21

CSS in sharepoint

I need to apply a CSS to a Sharepoint site (WSS3.0) based on the theme applied to a site. The CSS would be saved at root site in 'Document Library'. How do I apply the CSS programmatically on the page?

Thanks!

Upvotes: 2

Views: 657

Answers (1)

Nat
Nat

Reputation: 14295

Put in the page layout or master page. E.g.

<SharePointWebControls:CssRegistration ID="CssRegistrationMyCSS" name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/myCSS.css %>" runat="server"/>

Programatically changing it requires you to modify the control on page load. Not sure how well it would work though.

Upvotes: 1

Related Questions