HTML table needs spacing between columns, not rows

The better approach uses Shredder’s css rule: padding: 0 15px 0 15px
only instead of inline css, define a css rule that applies to all tds.
Do This by using a style tag in your page:

<style type="text/css">
  td {
    padding: 0 15px;
  }
</style>

or give the table a class like “paddingBetweenCols” and in the site css use

.paddingBetweenCols td {
  padding: 0 15px;
}

The site css approach defines a central rule that can be reused by all pages.

If your doing to use the site css approach, it would be best to define a class like above and apply the padding to the class…unless you want all td’s on the entire site to have the same rule applied.

Fiddle for using style tag

Fiddle for using site css

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)