1. Open SharePoint Designer (SPD) and connect to the root level of your site's site collection.
2. In SPD, open the "Style Library" folder.
3. Create a new CSS file and name it (e.g. "customstyles.css").
4. Open your master page file in SPD.
5. In the tag add a link to your custom CSS just above the content place holder named "PlaceHolderAdditonalPageHead" as follows:
<link href="/Style%20Library/customstyles.css" rel="stylesheet" type="text/css" />
Your custom master page is now using your new CSS file in addition to all of the CSS files SharePoint uses out-of-the-box. The idea is that you are taking advantage of the "cascading" property of cascading style sheets by layering your custom styles on top of what SharePoint creates in order to alter the SharePoint look-and-feel as desired—like a skin.
Tuesday, 27 March 2012
The Best Way to Add Custom CSS to SharePoint
To thoroughly customize your SharePoint site, you'll need to use a custom CSS. SharePoint offers a way to specify a single CSS file to use via the "Master page" settings for the site. However, using this approach still limits you to customizing only those IDs and classes that are included on the pages by SharePoint. Moreover, using this setting applies to both site and system pages, which may not be desirable.
With these downsides in mind,Follow the steps below to include a custom CSS file in your master page.
Subscribe to:
Post Comments (Atom)
Popular Posts
-
To see a site collection's hidden user information list append /_catalogs/users/simple.aspx onto the end of the site collection url. ...
-
Please Check the below complete code to bind SharePoint list items to a DataTable/ Gridview. In this post, we are using the list named ...
-
To bind the drop down list data with a field from the SharePoint list you can use the below code methods:- Method 1 if (!Page.IsP...
-
By Default SharePoint shows 3 events for any date in the calendar view, if we want to show all the events then we have to use any of the fol...
-
This Javascript function checks if the parameter supplied exists in the query string. If the parameter supplied is found in the query strin...
-
You can use CAML to do the following: Modify parameters to transport complex data Define the body of SOAP messages to transport data usin...
-
You can use below powershell command to change sharepoint user display name. Set-SPuser -identity "User name" -DisplayName ...
-
SharePoint solutions are either deployed globally or targeted to a particular web application. The decision of which is made automatically...
-
The sharepoint site is very slow when we access it first time. After that the response time is good. The reason is compilation and cachin...
-
The following Event Handler code will prevent users from creating duplicate value in "Title" field. ItemAdding Event Handler ...
No comments:
Post a Comment