In styling a table, I’m encountering a problem where, using nth-child selector, I cannot seem to set a TD to border:none. Other border styles work as one would expect, but border:none will display the inherited border no matter what I do.
JSfiddle is here: http://jsfiddle.net/7NUtK/1/
Maybe this is what you were going for:
http://jsfiddle.net/thNJb/
I changed a few selectors around. It seemed to me that you were trying to get each time column to have a gray and white part (sub-column).
Two possible reasons I can think of why the selector
.schedule col:nth-child(even)didn’t seem to have any effect are:1. The border-left is applied to the td, not the col, so to set it to none you might need to select with td again.
2. Both rules seem to be at the same specificity. It is usually good to make overriding selectors more specific than the selector they override.
But instead of applying border-left to all td and then trying to set border-left to none on some cols, you should just apply the border-left to the tds you actually want to give that to. (This is what I did in my branched jsfiddle.)