highlight every other row in a list

Forums Classic DFFS highlight every other row in a list

Viewing 2 reply threads
  • Author
    Posts
    • #14896
      Roberto Garcia
      Participant

      Afteroon Alexander (HNY the best for this 2017).

      Question/favor, my boss just asked me to highlight every other row in a SharePoint list so he can easily follow up between each item. i did something very simple, i went to “Modify the view/Style/View Style” and i selected Shaded and it got the style he is looking for. The problem with this is that when i change to this view the alternate colors works but the ability to quickly switch views is now gone. I am adding two images “Image 1” this one is the default and “image 2” with the shading. is there any way to add some coding and highlight every other row in a list without lost the quick switch views?

      Thanks in advance and please have a great 2017

    • #14908
      Alexander Bautz
      Keymaster

      This is because Microsoft hasn’t provided a “new layout” for this list style. You can fix the highlighting of the rows by adding this code to a script editor web part in the page:

      <style type="text/css">
      tr:nth-child(even) {background: #CCC}
      </style>

      Alexander

    • #14921
      Roberto Garcia
      Participant

      Thank you Sir.. you rock.. have a great weekend.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.