How to alternate row background color (like, grey and white)?
How to alternate row background color (like, grey and white)?
don2
Posts: 27Questions: 15Answers: 0
Hi All,
How to alternate row background color (like, grey and white)?
any help appreciated.
thank you so much in advance
regards
Don
This question has an accepted answers - jump to answer
Answers
That's the default behaviour, please see here. Other examples show more styling options, plus this section of the manual should help.
Colin
Colin, looking at the example for Stripe today, no striping is apparent even in the sample table. What needs to be done to add striping? I am expecting that striping means that alternate rows will have a different color. Is this not the expected behavior?
https://datatables.net/examples/styling/stripe.html
The rows do have different background colors; they are light grey and white. This can be seen in your screenshot. Are you looking for something different?
Kevin
Yes, I can see them as well. It is possible @zzpenn that you are using a monitor that doesn't show light greys very well. Try changing the angle that you are looking at the monitor from - for example if you look at it from where your keyboard is, I'd guess that you'll be able to see the row stripes.
Allan
Thank you! Yes it was the monitor. I will need to change the style of striping to account for this. All of my users have the same monitor I'm using, so they won't see it either. For future readers, a style change example is here:
http://live.datatables.net/welezolo/1/edit