Is there a way to align different rows in a table vertically with minimal code?
I have a table with 3 rows, and I want the first two rows to be aligned vertically to the top, while the third row should be vertically aligned to the middle.
If I try to define:
td {vertical-align:top}
tr.middle {vertical-align:middle}
and assign class="middle"
to the relevant <tr>
in the HTML, it doesn't work because the td definition would persist.
The only solution I've found is to define:
td.top {vertical-align:top}
td.middle {vertical-align:middle}
and then apply the relevant class to every single td, but this results in too much code.
Is there any way to achieve this alignment with minimum effort?