Question

Is this sass code valid?

tr:nth-child(odd)
  :background-color #cccccc

Somehow, it does not color my table's alternating rows.

Was it helpful?

Solution

What browser are you using? nth-child isn't presently supported in Firefox, or IE. You'll probably have to use the old odd/even classes thing.

OTHER TIPS

Compass provides mixins for styling your tables with sass, it requires some extra css classes due to poor support of CSS3.

See the Table Utilities section of wiki docs for more information. A demo is here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top