cssalignmenthtml-tablehtml-tableextract

Aligning items in td


How to align the '1' and '2' that shows when a player click on the <td> centrally within the element?

Current version can be found here.


Solution

  • This is something that's very easy to find out by searching... anyways, since you're using table cells, just add the text-align: center; rule to the td:

    td {
        text-align: center;
    }