What's a good way to add some space between html table rows using css? Should work in all browsers including IE6. Should use id or class so it doesn't affect every table in the site. Prefer to declare the css at the table level. Don't want to use empty tr's to simulate a blank row. css should not affect any inner tables.
Logically I tried this but margins don't work with tr's:
.someclass tr
{
margin-bottom:20px;
}
You could use:
.someclass td {padding-bottom: 20px;}
It's unfortunately not that intuitive but it works on IE6 and all the other browsers. You can also do it with a border:
.someclass td {border-bottom: 20px solid white;}
Edit
To exclude an inner table you could use:
.someclass td td {padding-bottom: 0px;}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With