Partager via


Cascading Style Sheets Class Definitions for Windows SharePoint Services

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The classes for cascading style sheets that determine the styles and formatting applied to pages in Windows SharePoint Services are defined in Core.css, which is located in the following directory of each front-end Web server:

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

Warning

Changes made to Core.css may be lost when Windows SharePoint Services is updated, such as through installation of service packs or patches. An alternate .css file can be specified in the Onet.xml file of a site definition by using the AlternateCSS attribute of the Project element.

Identifying Applied Classes 

Add the following code sample within the BODY element of any ASPX page used in Windows SharePoint Services to identify which class is applied to a specified element in the user interface (UI). When you add the sample, a ToolTip appears when the pointer is passed over the UI, indicating which class is being used.

  • For example, you can add the sample to a Default.aspx file located within Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\SiteTemplates

  • You can also add the sample to an .aspx page used for a list stored in Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\Pages

  • Lastly, you can add it to an ASPX page used in SharePoint Central Administration stored within Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\ADMIN

Once you identify the class in use for a specified UI, you can use the table that follows to customize the styles and formatting in use to suit your own needs.

<script language="jscript">
function ClassInfo()
{
    if (window.event.srcElement.className != null)
    {
        stsclass.innerText = window.event.srcElement.className;
    }
    else
    {
        stsclass.innerText = "";
    }
}
 
window.document.body.onmouseover = ClassInfo;</script>
 
<div style="border-style:solid;border-width:1px; width: 281px; height: 34px; 
position: absolute; left: 286px; top: 41px; z-index:15; padding-left:4px; 
padding-right:4px; padding-top:2px; padding-bottom:2px; background-color:#EEEEF4">
<p id="stsclasstitle"><font face="Tahoma" id="stsclasstitle">Classname: </font>
<font face="Tahoma"id="stsclass">&#xa0;</font>
</p></div>

Defined Classes in Core.css

The following table provides information about the classes that are defined in Core.css.

Selector

Description

body, form

Sets the margin of the body or form to 0.

body

Sets the margin of the body to 0.

.ms-main

Border color at the right margin of a page.

.ms-toolbar

table.ms-toolbar

Text and gradient in list toolbars.

.ms-rtetoolbarmenu

.ms-rtetoolbarunsel

.ms-rtetoolbarsel

.ms-rtetoolbardis

a.ms-rtetoolbardis

.ms-rtetoolbarhov

Defines the look of the Rich Text Editor.

.ms-gridT1

Type of rating scale used in a question for a survey, such as Low, Average, and High.

.ms-viewselect a:link, .ms-GRFontSize

Text for available views displayed in the left navigation area for a list.

Font size used for text in the datasheet control.

select

Fonts for any of the drop-down or checkbox items in pages for customizing lists.

hr

Defines properties for a horizontal rule.

.ms-formlabel

Formats the names of fields used in forms for creating or editing list items or adjusting site settings.

.ms-formdescription A

Formats hyperlinks that appear in descriptions on forms such as "Click here to test".

.ms-formtable .ms-formbody

Text for each field in a list item form such as the New Item form for default lists.

.ms-radiotext

Text used for radio buttons in a survey.

.ms-gridtext

Text for a rating scale style used for a question in a survey.

.ms-formbody

Text for each field in a list item form such as the New Item form for default lists.

.ms-formbody FONT

Font characteristics for the formbody class.

.ms-formdescription

Instruction text used for fields in forms. For example, "Enter date in M/D/YYYY format" used in the New Item form.

.ms-searchcorner

Search form field on the home page.

table.ms-form th

Table header for forms.

table.ms-form td

Reserved for internal use only. Do not alter.

.ms-formrecurrence

Text that describes recurrence patterns.

.ms-long

Text in non-date fields used in forms for creating or editing list items.

.ms-longer

Used by the Rich Text Editor.

.ms-italic

Italic font.

.ms-bold

Bold font.

.ms-bannerframe, .ms-GRHeaderBackground, .ms-storMeFree

Background for the banner of the navigation bar at the top of the page..

.ms-banner a:link

.ms-banner a:visited

White hyperlinked text in the banner of the navigation bar.

.ms-banner, .ms-GRHeaderText

White text in the banner at the top of the page.

.ms-nav td, .ms-nav .ms-SPZoneLabel, .ms-input

“Select a View” text in a list page.

Input boxes for non-text (currency, date/time, etc.).

.ms-nav th

Text in the Quick Launch bar on the home page.

.ms-navheader a, .ms-navheader a:link, .ms-navheader a:visited

Section headings in the Quick Launch bar.

.ms-navframe, .ms-GRStatusBar

Color behind the Quick Launch bar and around the datasheet.

.ms-storMeUsed, .ms-storMeFilterBar

Used on the storage management page.

.ms-navline

Line dividing sections of the left navigation area in list views.

.ms-navwatermark

"Quick Launch" text in the Quick Launch bar.

.ms-selectednav,.ms-GRSortFilter

Box around the selected view on the list view page.

Used for a selected column in the datasheet.

.ms-unselectednav

Unselected text on the Quick Launch bar.

.ms-verticaldots

Graphical separator that appears between the main body and the left margin of the page (no longer used).

.ms-nav a

.ms-nav a:link

.ms-nav a:hover

.ms-nav a:visited

Text in the left navigation of the Quick Launch bar. For example, "Shared Documents" and "Tasks".

.ms-titlearea

Site name that appears on each page above the page title (by default, "Team Web Site").

TD.ms-titleareaframe

Upper portion of the border at the left margin of the page.

Div.ms-titleareaframe

Yellow line above the title area of a page.

.ms-titlearealine, .ms-storMeEstimated

Yellow line below the title and above the list toolbar. Also used on the storage management page.

.ms-bodyareaframe

Area below the title.

.ms-pagetitle

Title text on each page.

.ms-pagetitle a

.ms-pagetitle a:hover

Hyperlinks that appear with title text.

.ms-pagecaption

Caption above the title for a Web Part Page.

.ms-selected

.ms-selected SPAN

Background for selected items in the Save or Save As dialog box when saving to a document library.

.ms-selectedtitle

Background for when the pointer is passed over a list item.

.ms-unselectedtitle

Background for a list item when not selected.

.ms-menuimagecell

Background color of the arrow next to an item title for a context menu.

.ms-filedialog td

List of selected shared documents in the Save or Save As dialog box when saving to a document library.

.ms-descriptiontext

Description text for a list,or description text on administration forms and new list forms.

.ms-dspadapterlist

Reserved for internal use only. Do not alter.

.ms-alerttext

Error messages on form submissions.

.ms-separator

Lines between the menu items on list toolbars.

.ms-authoringcontrols

Background color on the right side of administration pages.

.ms-sectionheader

Text in section headings on a page. For example, “Administration” on the Site Settings page.

.ms-sectionheader a

.ms-sectionheader a:hover

.ms-sectionheader a:visited

Section titles that expand and collapse on the Create View page.

.ms-sectionline

Horizontal lines between page sections.

.ms-partline

Line between list items and the text "Add new item" in a summary view style as used on the home page.

.ms-propertysheet

.ms-propertysheet th

.ms-propertysheet a

.ms-propertysheet a:hover

Text in list or site settings pages. For example, "Go Back to Shared Documents", or the text used under settings, such as "Use a filter to display..."

.ms-itemheader a

List and document library names on the Documents and Lists page.

.ms-discussiontitle

Subject for an open discussion item.

.ms-vh, .ms-vh2

Text in column headings for lists.

.ms-vh2

Used for padding.

.ms-vh-icon

.ms-vh-icon-empty

.ms-vh-left

.ms-vh-left-icon

.ms-vh-left-icon-empty

.ms-vh-right

.ms-vh-right-icon

.ms-vh-right-icon-empty

Used for icons next to the view headers, such as the icon representing an attachment, or used for spacing when no icon is present.

.ms-vh a,.ms-vh a:visited,.ms-vh2 a,.ms-vh-left a,.ms-vh-right a

.ms-vh a:hover, .ms-vh2 a:hover, .ms-vh-left a:hover, .ms-vh-right a:hover

Text in hyperlinks for column headings of lists.

.ms-vhImage

Used in header images.

.ms-gb

Defines the group-by view headers.

.ms-gb2

Defines the group-by view headers.

.ms-vb, .ms-vb2, .ms-GRFont, .ms-vb-user

.ms-vb a, .ms-vb2 a, .ms-GRStatusText a,.ms-vb-user a

.ms-vb a:hover, .ms-vb2 a:hover, .ms-vb-user a:hover

.ms-vb a:visited, .ms-vb2 a:visited, .ms-GRStatusText a:visited, .ms-vb-user a:visited

.ms-vb a:visited:hover, .ms-vb2 a:visited:hover, .ms-vb-user a:visited:hover

.ms-vb2, .ms-vb-title, .ms-vb-icon,.ms-vb-user

.ms-vb-icon

.ms-vb-user

.ms-vb2

Text in the body of a view and most other common text.

Icon classes that are used, for example, to indicate attachments.

.ms-homepagetitle

Title on the home page of a Meeting Workspace site.

a.ms-addnew

td.ms-addnew

"Add new..." text in the summary view for lists.

.ms-error

Error messages on form submissions.

.ms-cal

Border type and font formatting used in day cells of a calendar view.

.ms-calWeek

.ms-vcal

.ms-Dcal

Used in a calendar view.

.ms-caltop

Top border of each day cell in a calendar view.

.ms-calhead

.ms-calhead a

.ms-calhead a:hover

Header containing the month name and navigation arrows in a calendar view.

.ms-caldow

Row of cells containing weekday names in a calendar view.

.ms-calmid

Left and right borders on each day cell in a calendar view.

.ms-CalSpacer

Spacer that is used between multiple appointments on the same day in a calendar view.

.ms-CalVSpacer

Spacer used in a calendar view.

.ms-CalAllDay

Calendar view for all-day events.

.ms-firstCalHour

Calendar view in which the first cell in the first row contains the time.

.ms-calHour

Calendar view cell that contains the time.

.ms-calHalfHour

Calendar view cell that contains half-hour marks.

.ms-calQuarterHour

Calendar view cell between hour cells.

.ms-calbot

Bottom row that represents an hour, day, or week in a calendar view.

.ms-appt a

.ms-appt a:hover

Hyperlinked text for an event that spans multiple days in a calendar view.

.ms-appt, .ms-GRCellSelect

Background,border, and text for an event that spans multiple days in a calendar view.

.ms-Dappt

Appointments displayed in a view by day.

.ms-Vappt

.ms-Vappt a

.ms-Vappt a:link

.ms-Vappt a:hover

Appointments displayed in a vertical view by day.

.ms-apptsingle

Text for an appointment that lasts a single day.

.ms-Dapptsingle

Appointments displayed in a view by day with no duration set.

.ms-Vapptsingle

.ms-Vapptsingle a

.ms-Vapptsingle a:link

.ms-Vapptsingle a:hover

Appointments displayed in a view by day with no duration set.

.ms-caldowdown

Calendar table cell for Internet Explorer 5.0 or earlier.

.ms-caldown

Day of week in calendar for Internet Explorer 5.0 or earlier.

.ms-datepickeriframe

Position of date-chooser pop-up calendar when creating or editing a list item.

.ms-datepicker

Date-chooser pop-up calendar when creating or editing a list item.

.ms-dpdow

Line under weekday names in the date-chooser pop-up calendar when creating or editing a list item.

.ms-dpday

Text of date numerals for the current month in the date-chooser popup calendar when creating or editing a list item.

.ms-dpselectedday

Text and background of the selected date in the date-chooser pop-up calendar when creating or editing a list item.

.ms-dpnonmonth

Text of date numerals which are not part of the current month in the date-chooser pop-up calendar when creating or editing a list item.

.ms-dphead

Header containing the month name and navigation arrows in the date-chooser pop-up calendar when creating or editing a list item.

.ms-dpnextprev

Arrows in the date-chooser pop-up calendar for moving from one month to the next or previous month.

.ms-dpfoot

"Today's date" text and the line above it in the date-chooser pop-up calendar when creating or editing a list item.

IMG.ms-button

Changes the cursor to a hand when the pointer is passed over buttons.

.ms-announcementtitle

Titles in the Announcements list view on the home page.

.ms-homepagetitle:Hover

List title in a list view. For example, the words "Announcements", "Events" and "Links" on the default.htm page.

.ms-discussionseparator

Space between discussion threads.

.ms-summarytitlebarframe

.ms-summarytitlebar a:link

.ms-summarytitlebar a:visited

.ms-summarytitlebar

.ms-summarytitlebartitle.ms-

summarytitlebartitle:hover

Unused

img.thumbnail

Color behind thumbnail in the Picture Preview area of the left navigation area in a picture library.

tr.ms-imglibselectedrow , tr.ms-highlight

Color of a row in a picture library when the row is selected in the Selected Pictures view.

.ms-imglibthumbnail

Background for thumbnails in Thumbnails view. Border color should be the same as for img.thumbnail style.

span.thumbnail

span.userdata

Reserved for internal use only. Do not alter.

.ms-imglibmenuarea

Background of the previous and next button in Filmstrip view of a picture library.

a.ms-imglibPreviewTitle

table.ms-imglibPreviewTable

Reserved for internal use only. Do not alter.

.UserShadedRegion

Shaded areas in Web Parts.

.UserCaption

Text areas in Web Parts.

.UserConfiguration

Text areas in Web Parts.

.UserDottedLine

Dotted lines in Web Parts.

.UserButton, .UserInput, .UserSelect

Input boxes in Web Parts.

.UserNotification

Text areas in Web Parts.

.UserToolBarTextArea

.UserToolBarTextArea a: link

.UserToolBarTextArea a: visited

.UserToolBarTextArea a: hover

Spacing for elements on toolbars in Web Parts.

.UserToolbarDisabledLink

.UserToolbarImage

.UserToolBarImageArea

.UserToolbarSelectedImage

Elements on toolbars in Web Parts.

.UserGenericHeader

Header text in Web Parts.

.UserGeneric

Default text in Web Parts.

.UserGenericBody

Indented body text in Web Parts.

.UserGenericText

Generic text that is used in all Web Parts.

.UserBackground

Background areas in Web Parts.

.UserSectionTitle

Form titles in Web Parts.

.UserSectionHead

Control labels in Web Parts.

.UserSectionBody

Instructional text on controls in Web Parts.

.UserControlGroup

Area of form controls in Web Parts.

.UserSectionFooter

Area at the bottom of user forms containing dotted line and command buttons.

.UserFooter

Area at the bottom of a form.

.UserCommandArea

Command button area at the bottom of a user form.

.UserToolbar

Toolbars in Web Parts.

.UserCellSelected

Selected cells in Web Parts.

.UserCell

Cells in Web Parts.

.UserGenericBulletItem

Bulleted items in Web Parts.

.ms-ToolPaneFrame

Background of the tool pane interior in Web Parts.

.ms-ToolPaneBody

Body of the tool pane in Web Parts.

.ms-ToolPaneBorder

Border around the tool pane in Web Parts.

.ms-ToolPaneHeader

Header of the tool pane in Web Parts.

.ms-ToolPaneClose

Area around the button for closing the tool pane in Web Parts.

.ms-ToolPaneTitle

Title of the tool pane in Web Parts.

.ms-ToolPaneFooter

Footer area of the tool pane in Web Parts.

.ms-ToolPaneError

Error messages that appear in the tool pane of Web Parts.

.ms-ToolPaneInfo

Information messages that appear in the tool pane of Web Parts.

.ms-ToolPartSpacing

Spacing between Web Parts.

.ms-ToolStripSelected

Hover behavior for the title bar at the top of the tool pane in Web Parts.

.ms-ToolStrip

Title bar at the top of the tool pane in Web Parts.

.ms-TPHeader

Header of the tool pane in Web Parts.

.ms-TPBorder

Border of the tool pane in Web Parts.

.ms-TPTitle

Title of the tool pane in Web Parts.

.ms-TPBody

.ms-TPBody A:link, .ms-TPBody A:visited, .ms-TPBody A:hover

Body of the tool pane in Web Parts.

.ms-TPCommands

Commands on the tool pane in Web Parts.

.ms-TPInput

Commands on the tool pane in Web Parts.

.ms-PropGridBuilderButton

"..." buttons in the tool pane of Web Parts.

.ms-BuilderBackground

Background of dialog boxes opened through property selections made through the tool pane in Web Parts.

.ms-SPZone

Borders of a zone control in Web Part Pages.

.ms-SPZoneSelected

Borders of a zone control in Web Part Pages when the insertion bar is active inside the zone.

.ms-SPZoneIBar

Insertion bar in Web Part Pages that shows the zone into which the user is dragging a Web Part.

.ms-SPZoneLabel

Label for a zone in Web Part Pages.

.ms-SPZoneCaption

Caption for the text inside a zone in Web Parts Pages.

.ms-WPDesign

Background for design mode in Web Part Pages.

.ms-WPMenu

Area around the menu in Web Parts.

.ms-WPTitle

.ms-WPTitle A:link, .ms-WPTitle A:visited

.ms-WPTitle A:hover

Title of a Web Part.

.ms-WPSelected

Border around a Web Part when the part is selected.

.ms-WPBody

.ms-WPBody TABLE, .ms-TPBody TABLE

.ms-WPBody A:link, .ms-WPBody A:visited

.ms-WPBody A:hover

.ms-WPBody th, .ms-TPBody th

.ms-WPBody TD

.ms-WPBody h1, .ms-TPBody h1

.ms-WPBody h2, .ms-TPBody h2

.ms-WPBody h3, .ms-TPBody h3

.ms-WPBody h4, .ms-TPBody h4

.ms-WPBody h5, .ms-TPBody h5

.ms-WPBody h6, .ms-TPBody h6

Contents of a Web Part.

.ms-WPBorder

Border around a Web Part.

.ms-HoverCellActive

.ms-HoverCellInActive

.ms-HoverCellActiveDark

Cell behavior throughout the UI for when the pointer is passed over a cell.

.ms-SPLink

.ms-SPLink A:link, .ms-SPLink A:visited

Text for Modify Page link.

.ms-SPButton

Font for buttons.

.ms-PartSpacingVertical

Vertical spacing between Web Parts.

.ms-PartSpacingHorizontal

Horizontal spacing between Web Parts.

.ms-WPHeader

Background area of the title bar in Web Parts.

.ms-rtApplyBackground

.ms-tbButtonMouseOverDown

.ms-rtRemoveBackground

Classes for the Rich Text Editor.

.ms-subsmanageheader

Section headers used on the pages for managing alerts: MySubs.aspx and SiteSubs.aspx. For example, Frequency: Immediate.

.ms-subsmanagecell

Subscription rows used on the pages for managing alerts: MySubs.aspx and SiteSubs.aspx.

.ms-ConnError

Error messages related to authoring connections.

.ms-underline

Underlines for the description, items, and last modified text on the Documents and Lists page.

.ms-underlineback

Same as ms-underline but adds a slight gray to the background that is used for titles on the Documents and Lists page.

.ms-back

Background that includes the color gray and spacing.

.ms-smallheader

Header used for group names(for example, Document Libraries) on the Documents and Lists page.

.ms-smallsectionline

Underline for group names (for example, Document Libraries) on the Documents and Lists page.

.ms-tabselected

.ms-tabinactive

.ms-tabinactive a:link

.ms-tabinactive a:hover

.ms-tabinactive a:visited

.ms-tabinactive a:hover

Tabs in a Meeting Workspace site.

.ms-surveyHBar

.ms-surveyHBarB

.ms-surveyVBar

.ms-surveyVBarB

.ms-surveyVBarBI

.ms-surveyVBarS

.ms-surveyVBarT

.ms-surveyVBarTC

.ms-surveyHR

Horizontal rules, horizontal bars, and vertical bars in the chart for rating questions in the Graphical Summary view of surveys.

.ms-surveyTotal

Spacers between verticals bars in the chart for rating questions in the Graphical Summary view of surveys.

.ms-uploadborder

Border around the control for uploading multiple files.

.ms-uploadcontrol

Background for selected text in the file list of the control for uploading multiple files.

.ms-spaceBetContentAndButton

.ms-ButtonHeightWidth

.ms-ButtonHeightWidth2

.ms-SpaceBetButtons

.ms-summarycustombody

.ms-summarystandardbody

Reserved for internal use only. Do not alter.

.ms-stylebox

.ms-stylelabel

.ms-styleheader

.ms-styleheader a:link, .ms-stylebody a:link

.ms-styleheader a:visited, .ms-stylebody a:visited

.ms-stylebody

.ms-styleheader a:hover, .ms-stylebody a:hover

Classes used in boxed view styles such as Document Details, Issues Boxed, etc.

.ms-alternating

Background color for the shaded view style.

.ms-MWSSelectedInstance

.ms-MWSInstantiated a:link, .ms-MWSInstantiated a:visited

.ms-MWSInstantiated a:hover

.ms-MWSUninstantiated a:link, .ms-MWSUninstantiated a:visited

.ms-MWSUninstantiated a:hover

Classes used for the recurrence navigation bar in a Meeting Workspace site.