Horizontally, I'm trying to glue left and right cells by "-" without any white space between them. So I tired to create a middle cell between them with content "-", but it has margin among three cells, so I wondered how do I get rid of the white space (padding
and margin
) between the middle cell and other cells?
HTML
<table id="test">
<tr id="userr1">
<th>Left</th>
<th class="mid">-</th>
<th>Right</th>
</tr>
<tr id="row1">
<td>cell</td>
<td class="mid">-</td>
<td>cell</td>
</tr>
<tr id="row2">
<td>cell</td>
<td class="mid">-</td>
<td>cell</td>
</tr>
</table>
And the CSS:
#test, th, td {
border: 1px solid black;
margin: 0px;
}
.mid {
border: none;
padding: 0px;
margin: 0px;
}