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

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -