Formatting text in an html table column?

Posted by DavidR on Stack Overflow See other posts from Stack Overflow or by DavidR
Published on 2010-06-09T00:18:56Z Indexed on 2010/06/09 0:22 UTC
Read the original article Hit count: 627

Filed under:
|
|

So, I have a table like below. Imagine there are multiple columns, I thought by formatting the <col/> tag I would be able to change the formatting of every <td> in that column. I want to give data in the first column a text-align:center, but it doesn't seem to work. Is there a way to get this to work other than adding a class to every <td>?

<table>
    <col class="column"/>
    <tr> 
        ... 
    </tr>
    <tr> 
        ... 
    </tr>
    <tr> 
        ... 
    </tr>
</table>

© Stack Overflow or respective owner

Related posts about html

Related posts about tables