Search code examples
sharepointsharepoint-2010

SharePoint listview color change on checkbox click


I have a SharePoint list and I have changed the row color by adding this piece of code in CEWP.

<style type="text/css">
.ms-alternating
{
background-color: White;
}
</style>

Now when I click on the checkbox at the left of the row, the item color is very dark and the letters are not viewable.

Is there any way to change the color of them too?


Solution

  • Try the below

    <style type="text/css">
    
    TR.s4-itm-selected > TD {
        COLOR: pink !important;
    background-color:green;
    }
    TR.s4-itm-selected:hover > TD {
        COLOR: pink !important;
        background-color:green;
    }
    tr.s4-itm-selected a, tr.s4-itm-selected:hover a{
    COLOR: pink !important;
    }</style>
    

    Please remember that you will have to click on the checkbox to see the change in text colours Cheers Truez