Is this possible via CSS?
I'm trying
tr.classname {
border-spacing: 5em;
}
to no avail. Maybe I'm doing something wrong?
csshtml
Is this possible via CSS?
I'm trying
tr.classname {
border-spacing: 5em;
}
to no avail. Maybe I'm doing something wrong?
Best Answer
You need to use padding on your
td
elements. Something like this should do the trick. You can, of course, get the same result using a top padding instead of a bottom padding.In the CSS code below, the greater-than sign means that the padding is only applied to
td
elements that are direct children totr
elements with the classspaceUnder
. This will make it possible to use nested tables. (Cell C and D in the example code.) I'm not too sure about browser support for the direct child selector (think IE 6), but it shouldn't break the code in any modern browsers.This should render somewhat like this: