Alternating row colors doesn't occur despite consistent formatting between pages.
Alternating row colors doesn't occur despite consistent formatting between pages.
totallyplandom
Posts: 27Questions: 1Answers: 1
Hi All,
I'm having a bit of quirky behavior out of DataTables. Basically I have some tables for which "alternating row colors" does not occur. Is there any completely obvious reason this would fail? I'm using the EXACT SAME CSS for all tables, they simply contain different data. It just seems that DT randomly decides that some tables shouldn't use alternating row colors.
Best.
I'm having a bit of quirky behavior out of DataTables. Basically I have some tables for which "alternating row colors" does not occur. Is there any completely obvious reason this would fail? I'm using the EXACT SAME CSS for all tables, they simply contain different data. It just seems that DT randomly decides that some tables shouldn't use alternating row colors.
Best.
This discussion has been closed.
Replies
Are you using jquery theming?
@GregP Since the alternating "even/odd" row class designations are dependent on being below the "class" my CSS shouldn't matter at this point -- and in fact I removed it completely just to test. Still the same inconsistent behavior.
1. Some tables are not having "even" and "odd" applied to their rows. Look in Firebug or Dev Tools. Do the rows have a class?
2. If so, still in Firebug/Dev Tools, can you see if the "even" or "odd" color styles are "crossed out" (meaning CSS with more priority has taken over)
3. If the rule is "crossed out", and you don't see any other declared CSS rules that have priority, can you see any inline styles being applied? (usually this is JavaScript applying "background-color: #whatever" and inline styles DO have higher priority all things considered).
There will be some sort of culprit. DT doesn't have a fickle personality; the page just runs the code it's told to.
Thanks. Yes, I'm aware that DT shouldn't be fickle, per se. However, I was using "randomly" to denote that I have, as yet, been unable to track it to a specific cause -- there's no consistency -- given that all pages use the same code (but not data). Perhaps it's choking on some text/number formatting in a particular table.
As far as "being below" is concerned, I meant "contained within". Only class "row"s that are below (or contained within) class "awesome table" should be changed. Any occurrences of "row" not contained within an "awesome table" shouldn't be affected. You know, hierarchically "below".
Anyway, I'd been working primarily in Safari, but I verified that the same errors occur in FF, and IE on Windows. I'll check Firebug and post back if/when I have more info.
Thanks again.