How do I apply only horizontal cell spacing to a HTML table?
html, html-table
Solution
A better way than setting `cellspacing="10"` is to use CSS. You can use the following CSS to target the table's cell spacing.
table {
border-spacing: 10px 0;
}
The first value specifies the horizontal spacing, and the second value specifies the vertical spacing.
Problem
I recently found out that I need to use the cellspacing attribute in my table, but I was wondering if I could get it to work only horizontally. I don't want it to vertically spread out, that messes up the layout of my entire page.