I'm trying to create an HTML table that displays reservations like:
9am 10am 11am
|--------|--------|--------|
Mon |<booked>|<booked>| |
|--------|--------|--------|
I can do most of that easily but I can't figure out how to get the times on the header line to appear centered above the lines between columns as shown above rather than appearing within cells in the columns, e.g.:
9am 10am 11am
|--------|--------|--------|
Mon |<booked>|<booked>| |
|--------|--------|--------|
I've been playing around with several workarounds including having 3 columns for every "real" column so I can merge them on the header line but that leaves me needing to fill that middle cell for the data lines to make it look like a simple cell boundary so it's not great.
I feel like it's got to be something simple but google and trial-and-error are failing me so far.
I'm trying to do this within a K2 article on a Joomla web site so I'd prefer a way to do this just in HTML, not defining a CSS stylesheet as that opens a whole other problem with K2 articles in Joomla.
EDIT here is what I have thanks to @Johannes' answer but avoiding a CSS stylesheet so I don't have to deal with implementing that in K2/Joomla:
<table cellspacing="0" cellpadding="3">
<tbody>
<tr>
<td style="width: 25%; text-align: center; vertical-align: middle;"> </td>
<td style="width: 25%; vertical-align: middle;"><span style="display: inline-block; transform: translateX(-50%);">9am</span></td>
<td style="width: 25%; vertical-align: middle;"><span style="display: inline-block; transform: translateX(-50%);">10am</span></td>
<td style="width: 25%; vertical-align: middle;"><span style="display: inline-block; transform: translateX(-50%);">11am</span></td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle;">Mon</td>
<td style="border: 1px solid #000000; text-align: center; vertical-align: middle;"><booked></td>
<td style="border: 1px solid #000000; text-align: center; vertical-align: middle;"><booked></td>
<td style="border: 1px solid #000000; text-align: center; vertical-align: middle;"> </td>
</tr>
</tbody>
</table>