This topic has not yet been rated - Rate this topic

SPWeb.CustomizeCss Method

Customizes the specified style sheet for the website.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public void CustomizeCss(
	string cssFile
)

Parameters

cssFile
Type: System.String
The file name and extension of the cascading style sheets (CSS) file.
Exception Condition
SPException

Customized CSS files are not supported on sites with alternate languages. See the IsMultilingual property.

-or-

cssFile is empty, null, or does not contain the .CSS extension of a CSS file.

When you execute this method to override the specified CSS, such as core.css, a copy of this file that can be found in the \\ProgramFiles\Common Files\Microsoft Shared\web server extensions\14\\Template\Layouts\1033\Stylesfolder is copied to the folder (access this by SharePoint Designer) named _styles on the website.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ