I have one table with two columns and in each column another table. I am trying to align each table within the column to the top of the table and I'm having issues.

I'm paraphrasing the code here:

<table>
<tr>
    <td>
        <table>
        <tr>
            <td>
            </td>
        </tr>
        </table>    
    </td>
    <td>
        <table>
        <tr>
            <td>
            </td>
        </tr>
        </table>    
    </td>
</tr>
</table>

What would the best way be to align these inner tables with the top of table's cells?

Recommended Answers

All 2 Replies

Assign a class to the cell (td) in lines 3 and 11.

Then apply the vertical-align: top;

So for example if you assigned the class "top" then use this CSS...

 td.top {vertical-align: top;}

Thank you! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.