Daniel Protopopov Daniel Protopopov - 25 days ago 10
CSS Question

Two columns in a table

I'm trying to figure out how it is possible to construct a table with two columns (left and right) so that when left column' content ends the right column takes over it (see example).
I'm sure there's a way to do it without floats but correct me if I'm wrong.

Layout

Answer Source

Use colspan like this:

<table>
    <tr>
        <td>a1</td>
        <td>b1</td>
    </tr>
    <tr>
        <td>a2</td>
        <td>b2</td>
    </tr>
    <tr>
        <td colspan="2">ab3</td>
    </tr>
    <tr>
        <td colspan="2">ab4</td>
    </tr>
</table>