I have an HTML table. I need to have spacing between the table columns, but not the table rows.
If I use the cellspacing
CSS property it does it between bot
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:
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