Search code examples
htmlcsscellmargincss-tables

CSS Cell Margin


In my HTML document, I have a table with two columns and multiple rows. How can I increase the space in between the first and second column with css? I've tried applying "margin-right: 10px;" to each of the cells on the left hand side, but to no effect.


Solution

  • Apply this to your first <td>:

    padding-right:10px;
    

    HTML example:

    <table>
       <tr>
          <td style="padding-right:10px">data</td>
          <td>more data</td>
       </tr>
    </table>