Brian Brian - 3 months ago 17
CSS Question

Right align and left align text in same HTML table cell

I have a cell in an HTML

<table>
. I would like part of the cell contents to be left justified and part to be right justified. Is this possible?

Answer

If you want them on separate lines do what Balon said. If you want them on the same lines, do:

<td>
  <div style="float:left;width:50%;">this is left</div>
  <div style="float:right;width:50%;">this is right</div>
</td>