Skip to Main Content
Essential SharePoint 2007, 2nd Edition
book

Essential SharePoint 2007, 2nd Edition

by Jeff Webb
September 2007
Beginner content levelBeginner
448 pages
10h 2m
English
O'Reilly Media, Inc.
Content preview from Essential SharePoint 2007, 2nd Edition

Applying Stylesheets

SharePoint uses CSS to control the fonts, background, and foreground colors used by the sites on the SharePoint server. The default stylesheet is CORE.CSS, which is found at this location on the server:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\
TEMPLATE\LAYOUTS\1033\STYLES

Changes to CORE.CSS affect all of the SharePoint sites on the server. For example, making the following change:

body {
    font-family: verdana, arial, helvetica, sans-serif;
    background: white;
    color:red;
}

turns all of the body text on the server red! Be careful when editing this file.

Sites using themes are also affected by THEME.CSS found in the /TEMPLATE/THEMES/* folders. You can edit THEME.CSS to change the styles applied by a specific theme. For example, the following change to THEME.CSS in the NewTheme folder changes the page title font color for the theme created in the preceding section:

.ms-pagetitle{
color:black;
font-family:Verdana,Arial,Helvetica,sans-serif;
font-weight:bold;
}

Changing styles in a theme doesn't immediately change existing sites based on that theme, because stylesheets are cached on the client. If you don't see the changes you've made, force a full refresh of the page by pressing Ctrl+F5 in the browser. The full refresh reloads any cached stylesheets—just clicking the Refresh button won't do that.

Identifying the class name of styles that SharePoint uses on a page is difficult. Appendix B includes instructions on how to use a custom web part ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Office SharePoint® Server 2007 Best Practices

Microsoft® Office SharePoint® Server 2007 Best Practices

Ben Curry, Bill English
SharePoint 2007: The Definitive Guide

SharePoint 2007: The Definitive Guide

James Pyles, Christopher M. Buechler, Bob Fox, Murray Gordon, Michael Lotter, Jason Medero, Nilesh Mehta, Joris Poelmans, Christopher Pragash, Piotr Prussak, Christopher J. Regan

Publisher Resources

ISBN: 9780596514075Errata Page