In a current project I have a three-columned table.
<table>
<tr>
<th>Datum</th>
<th>Entschuldigt?</th>
<th>Vermerkt von</th>
</tr>
</table>
My current stylesheet for the table looks as following:
th {
border-bottom: 1px solid black;
}
td + td {
border-left: 1px solid black;
border-right: 1px solid black;
}
Now I would like to have those little spaces removed so the column separators and the header separator are solid and not that kind of dashed. Every help is very much appreciated
You need to use border-collapse: collapse
on the table:
th {
border-bottom: 1px solid black;
}
td+td {
border-left: 1px solid black;
border-right: 1px solid black;
}
table {
border-collapse: collapse;
}
<table>
<tr>
<th>Datum</th>
<th>Entschuldigt?</th>
<th>Vermerkt von</th>
</tr>
<tr>
<td>item 1</td>
<td>item 2</td>
<td>item 3</td>
</tr>
<tr>
<td>item 1</td>
<td>item 2</td>
<td>item 3</td>
</tr>
</table>
You beat me to it. In js-fiddle that left me with a right border that might be desired I got rid of the right rule and also centered it, looks all right.
Also check this out: w3schools.com/css/css_table.asp
I will try this out as soon as possible and then give feedback.
This works fine as well. Appreciate it!