Kiko Kiko - 2 months ago 9
CSS Question

CSS: How to align table data

enter image description here

How to align BDS to education? Without using white-space:nowrap.

<div class="doc-schedule clearfix">
<p>
<table style="border: 0px;border-style: none">
<tr>
<td><strong>Speciality</strong></td>
<td class="tdPadding"><span>{{ page.dentist_specialty }}</span></td>
</tr>
<tr>
<td><strong>Education</strong></td>
<td class="tdPadding"><span>{{ page.dentist_education }}</span></td>
</tr>
<tr>
<td><strong>Work Days</strong></td>
<td class="tdPadding"><span>{{ page.dentist_workdays }}</span></td>
</tr>
</table>
</p>
</div>
........

Answer

tr are vertically aligned middle by default

add this

tr {
  vertical-align:top
}

DEMO