I am facing an issue with aligning text in a table properly.
In my table, I have two columns - first column
and second column
, both with colspan="4"
:
It is supposed to look like this:
<tr>
<td colspan="4">
First column
</td>
<td colspan="4">
Second column
</td>
</tr>
<tr class="empty"><td colspan="8"> </td></tr>
<tr>
<td colspan="4">
<?php echo 'Price';?>:
</td>
<td colspan='1' style="text-align: right">
<?php echo 'Value';?>
</td>
<td style="padding-left:10px" colspan='1' >
<?php echo 'Currency';?>
</td>
<td colspan='2'> </td>
</tr>
<tr>
<td colspan="4">
</td>
<td colspan="1" style="text-align: right"><?php echo $price; ?></td>
<td colspan="1" class="pull-right"><?php echo $currency; ?></td>
<td colspan="2" style="height:10px;"> </td>
</tr>
.pull-right {
padding-left: 10px;
}