Quantcast
Viewing all articles
Browse latest Browse all 31

Answer by fuddin for Set cellpadding and cellspacing in CSS?

<table>
    <tr>
        <th>Col 1</th>
        <th>Col 2</th>
        <th>Col 3</th>
    </tr>
    <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
    </tr>
</table>

cell-padding can be given by padding in CSS while cell-spacing can be set by setting border-spacing for table.

table {
    border-spacing: 10px;
}
td {
    padding: 10px;
}

Fiddle.


Viewing all articles
Browse latest Browse all 31

Trending Articles