This is the way (I thought it was impossible):
First, set only the vertical border spacing for the table (for example, 5 pixels) and set the horizontal border spacing for it to 0. Then you must set the correct borders for each cell in the row. For example, the rightmost cell in each row should have a border at the top, bottom, and right. The leftmost cells must have a border above, below, and to the left. And the rest of the cells between the two should have a border only above and below. Like this example:
<table style="border-spacing:0 5px; color:black"> <tr> <td style="border-bottom:thin black solid; border-top:thin black solid; border-left:thin black solid;">left-most cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid;">other cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid;">other cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid;">other cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid; border-right:thin black solid;">right-most cell</td> </tr> <tr> <td style="border-bottom:thin black solid; border-top:thin black solid; border-left:thin black solid;">left-most cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid;">other cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid;">other cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid;">other cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid; border-right:thin black solid;">right-most cell</td> </tr> <tr> <td style="border-bottom:thin black solid; border-top:thin black solid; border-left:thin black solid;">left-most cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid;">other cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid;">other cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid;">other cell</td> <td style="border-bottom:thin black solid; border-top:thin black solid; border-right:thin black solid;">right-most cell</td> </tr> </table>
Arash Esmaeili Apr 01 '18 at 8:18 2018-04-01 08:18
source share