Page 1 of 1
Alternating Row Colors
Posted: 03 Nov 2018
by YumaIT
I have placed a related table in a tab control and have the table pulling the correct records. How can I make each row alternate colors so that it is easier read? Here is an example:
- Alternating Row Needs.JPG (96.93 KiB) Viewed 2100 times
Notice Action # 32 and Action # 73; I would like to make the rows here alternate in colors.
Thanks in advance for any guidance.
Re: Alternating Row Colors
Posted: 05 Nov 2018
by AlexZver
Hi!
First of all, you should assign a CSS class to your related items table, i.e. "related-issues". Then add this CSS rule to your CSS Editor:
Code: Select all
.related-issues .ms-alternating td {
background-color: gray;
}
Re: Alternating Row Colors
Posted: 06 Nov 2018
by YumaIT
Alex, thanks for this. What if I already have a CSS class assigned to this? Can my clas have multiple parameters? For example, the CSS class Assigned is:
fd.populateFieldsInGrid($('.related-items'), {
Ticket: '{CurrentItem}',
});
That is added in the Javascript Editor already. Can I simply add the alternating code to it?
Re: Alternating Row Colors
Posted: 06 Nov 2018
by AlexZver
Hi!
No, no, no, not in the JavaScript Editor, but in the CSS Editor.
- Screenshot_89.png (15.98 KiB) Viewed 2089 times
Copy and paste this code:
Code: Select all
.related-items .ms-alternating td {
background-color: gray;
}
Re: Alternating Row Colors
Posted: 12 Nov 2018
by YumaIT
Thank you Alex, this worked perfectly. Again, thanks for your help!