Make the following changes:
- for
td
, changepadding-left
topadding-right
. - for
td:before
, changeleft
toright
, andpadding-right
topadding-left
. - add
text-align: right
totable
.
Update: If you want your cells to wrap in narrow widths: first, remove padding-right
from td
, then change the td:before
CSS to the following:
td:before {
display: inline-block;
vertical-align: top;
width: 45%;
padding-left: 10px;
}
Here's a complete example that covers more edge cases: http://jsbin.com/ASOnaXug/2