Hacker News new | past | comments | ask | show | jobs | submit login

imo, flex-box and evangelism of box-sizing border-box have been the best things since CSS3 selectors and transforms/transitions.

i only wish that <col> elements could propagate style rules as if they were parents of all the related td/th cells. there's still no way to specify text-align and font-* on entire columns easily, which is just silly.




Depends on your definition of "easy"... assuming your markup is being generated on the server or using templates or whatever (in other words, a loop), you can add a different class to each table cell that is in the 2nd column.

Or if you don't need IE8 support you could use the nth-child selector (e.g. .my-table td:nth-child(2) { text-align: center; }).

In some cases I would argue one of these techniques would be cleaner / better than adding a <col> element just for a styling hook. But in other cases I agree with you that it would be nice if <col> styles propogated.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: