tags:

views:

70

answers:

2

How do you style a table with columns of data instead of rows? (or how do you build a table where the column headings relate to the row headings?)?

+1  A: 

It's hard to tell from your question, but it sounds like you want to know how to style columns in a table. What you need is the col tag.

Here's an example:

<table>
    <col/>
    <col style="background-color: #ffff00"/>
    <col/>
    <thead>
        <th>One</th>
        <th>Two</th>
        <th>Three</th>
    </thead>
    <tr>
        <td>One</td>
        <td>Two</td>
        <td>Three</td>
    </tr>
</table>
emmychan
+1 That's the easiest way.
Gert G
A: 

You can use divs. And then, in each column, you could use more divs one for each row.

mrrtnn