How to set table cell padding from CSS?

Jérôme Verstrynge picture Jérôme Verstrynge · Apr 7, 2012 · Viewed 7.8k times · Source

I am struggling with a cell padding issue in a given HTML table (generated by Drupal).

The table is the following:

enter image description here

I tried the following:

.view-thumbnails-of-tips-and-tricks {
    padding: 10px 10px 10px 10px;  
}

I want to adding padding around cell content as following:

enter image description here

Unfortunately, the padding goes around the table, rather than the cells' content. How can I solve this?

Answer

The Alpha picture The Alpha · Apr 7, 2012
.view-thumbnails-of-tips-and-tricks tr td {
    padding: 10px;  
}