html - How to center text for one of the column -
html - How to center text for one of the column -
i know funny have never heard best way center specific column within table tags col
i have table
<table> <colgroup> <col /> <col style="text-align: center;" /> </colgroup> <tbody> <tr> <td> </td> <td> must in center </td> </tr> <tbody> </table>
but doesn't center text, wonder why?
while in perfect world, solution work, css cascade doesn't quite work way. feat not, because css selectors powerful. see it, best alternative utilize :nth-child
or :nth-of-type
.
or, add together classname cells (either manually or preferably programmatically), that's taking easy way out ;-)
further reading:
can utilize css3 selectors how:nth-child
works. update:
apparently, though, possible apply styles actual colgroup
: http://jsfiddle.net/aryqx/.
html css
Comments
Post a Comment