Highlight specific column headers in a SharePoint list

1–2 minutes

columnheaderhighlight.png

Highlighting specific column headers can be useful in drawing attention to specific information areas to make sure they’re complete or just to aid users in seeing the most important info quickly.

You can insert this script in a Script Editor webpart or save it in a css file in your Site Assets and reference the link in a content editor web part on the list page (much more accessible and easy to edit later).

Simply replace “Column1” with the exact name of your column header. Repeat the script as many times as you wish for each column header you want to highlight. Remember to change the script if you change a column name. And if this yellow isn’t your thing, check out this color wheel to help pick a new color code to use in your script.

[code]

<style>

.ms-vh-div[DisplayName="Column1"]

{

background-color:#FFFF66;

}

.ms-vh-div[DisplayName="Column2"]

{

background-color:#FFFF66;

}

</style>

[/code]

 

 


Discover more from Nate Chamberlain

Subscribe to get the latest posts sent to your email.

6 responses to “Highlight specific column headers in a SharePoint list”

  1. deiviDC Avatar
    deiviDC

    This work for me but only in my DisplayView Is there Any way we can do the same during im editing de list
    ?

    1. SharePoint Librarian Avatar

      When you’re viewing the list in “edit” mode, follow the same steps and see if that works. It may behave similarly to new/edit/display forms in that each one requires the same code to be applied separately as if different pages altogether.

  2. Murugan Avatar
    Murugan

    Hi Nate,

    Is there any way we can color complete header row with yellow instead of just column header?
    Thank you,

    1. SharePoint Librarian Avatar

      Hi Murugan,

      Yes, you can color the entire row instead. I’ve written a post about how to accomplish that here: https://sharepointlibrarian.com/2018/07/20/customize-styles-formatting-of-sharepoint-list-column-header-rows/

      1. Murugan Avatar
        Murugan

        Thank you, very much 🙂

  3. Murugan Avatar
    Murugan

    Thank you, for the post

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Nate Chamberlain

Subscribe now to keep reading and get access to the full archive.

Continue reading