Saturday, March 1, 2014

Modifying CSS Sharepoint & Scholantis

How to add an Alternate Style Sheet in SharePoint 2010


Alternate Style Sheets in SharePoint 2010 allow us to easily apply some branding to the SharePoint interface by overriding the default styles.
To define the style you wish to change use Firebug for Firefox or Internet Explorer’s Web Developer Tools.
Once you know the style you wish to change then create a new CSS file on your local machine with that style in it. If you only want to change one descriptor for that style then you only need to include that descriptor.
For example:
If you wanted to change the font size of the .ms-WPTitle style.
The default style is:
.ms-WPTitle {font-family: Verdana, Tahoma, sans-serif; font-size: 10pt; font-weight: normal; }
All your new css file needs to contain is:
.ms-WPTitle {font-size: 10pt;}
Follow these instructions to add the new CSS file as an alternate CSS file.
  1. Choose Site Actions > View All Site Content
  2. Choose Style Library > XSL Style Library
  3. Upload your new CSS file making sure it has a descriptive name such as custom-styles.css
  4. Choose Site Actions > Site Settings
  5. Under the Look and Feel section choose Master Page
  6. Under the Alternate CSS URL section choose ‘Specify a CSS file to be used by this publishing site and all sites that inherit from it’
  7. Click the Browse button and locate the custome-styles.css file you uploaded a few moments ago and choose OK
  8. Click OK on the Site Master Page Settings Page
Your alternate styles will now appear.
http://blog.nigelgentry.co.uk/add-alternate-style-sheet-sharepoint-2010/