Frage

How can I obtain in a simple way this format inside cells of a table?, I mean all dashes aligned, when I am using a proportional font.

example:

enter image description here

Note: There are more cells on each row, and table uses borders, so I think that using three consecutive cells without borders, is not an option

War es hilfreich?

Lösung

Well using a table is not exactly would I would recommend but keeping to the request of your posting you can try something like this...

<table id="myTable">
<tbody>
    <tr>
        <td>1</td>
        <td>-</td>
        <td>Lorem ipsum dolor sit amet</td>
    </tr>
    <tr>
        <td>2039</td>
        <td>-</td>
        <td>consectetur adipisicing elit</td>
    </tr>
    <tr>
        <td>49</td>
        <td>-</td>
        <td>sed do eiusmod tempor incididunt </td>
    </tr>
    <tr>
        <td>560</td>
        <td>-</td>
        <td>ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud</td>
    </tr>
</tbody>

And some small CSS

#myTable tr td:first-child{ text-align:right; }
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top