SharePoint change font color in list

Note: This post applies to on-premise/server lists or O365 lists set to classic view. This will not work on modern views.

A little style on column header rows goes a long way. For example, just a background color and font adjustment can take your list from:

Before:

to
After:

Heres how you can apply your own styles to your list[s].

Create the style

Were simply going to add a CSS file to your Site Assets folder [Settings > Site Contents > Site Assets]. You can do this any of three different ways:

  • Download, then drag and dropthis file into your Site Assets folder within your browser, or
  • Copy and paste the following script into a text file using notepad or a similar simple text editing program and save as headers.css [must have the .css extension in file name]. Then drag and drop the file into Site Assets.
  • Create a new CSS file within SharePoint Designer and save it to Site Assets as headers.css.


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters

Show hidden characters





/*Choose your background color*/
.ms-viewheadertr{
background:#00426A;
}
/*Choose font style*/
.ms-vh2-nofilter, .ms-vh2, a.ms-headerSortTitleLink {
font-weight:bold;
color:white;
font-size:1.05em;
}
view raw

headers

hosted with by GitHub

Change the colors and font style as needed and save again.

Add the style to your list[s]

  1. Navigate to the list where youre adding the style
  2. Edit page
  3. Add a Web Part
  4. Media and Content > Content Editor > Add
  5. Edit Web Part
  6. Type /siteassets/header.css in the link field
  7. Expand Appearance and set Chrome State to Minimized and Chrome Type to None then click OK
  8. Stop editing the page

Thats it!

Want to take it a step further? Make your headers float/stick as you scroll!

  1. Heres how to make sticky/floating headers
  2. Copy the script from this post and paste it at the top of the file you download in the sticky headers tutorial
  3. Search for background-color: white; and replace it with the same background color your used in your styling above [#00426A; in my example]
  4. Save your changes to the downloaded file and follow the rest of the steps in the other post. Use the content editor youve already added in this post, replacing the /SiteAssets/headers.css line [since we added the script to top of the stickyheaders script] with the /SiteAssets/stickyheaders.js script which includes both.

Spread the word:

  • Click to share on Twitter [Opens in new window]
  • Click to share on Facebook [Opens in new window]
  • Click to share on LinkedIn [Opens in new window]
  • Click to print [Opens in new window]
  • More
  • Click to share on Pocket [Opens in new window]
  • Click to share on Skype [Opens in new window]
  • Click to email this to a friend [Opens in new window]

Like this:

Like Loading...

Related

Video liên quan

Chủ Đề