The thin border that appears seems to be caused by the display:table-row
and/or display:table-cell
property.
Note : it's actually not a white border, it's a kind of rgba:(0,0,0,alpha)
; you can see that if you change the background color behind the table.
By changing td
style to display:inline-block;
, or tr
style to display:block;
, it gets rid of the left & right border of the cells, but the bottom border stills stands.
In fact, overriding border-color
with a rgba(0,0,0,0);
on anything (table, tr, td...) doesn't change anything, neither does border-collapse:collapse;
(as Morpheus suggested).
Either the computed style doesn't show any border computed, but still, it's here...
Note: iOS also seems to compute the borders depending on the user's zoom scale (tested on a real iPad).
Here is the default table style for Safari iOS :
table {
display: table;
border-collapse: separate;
border-spacing: 2px;
border-color: gray;
}
tbody {
display: table-row-group;
vertical-align: middle;
border-color: inherit;
}
tr {
display: table-row;
vertical-align: inherit;
border-color: inherit;
}
td, th {
display: table-cell;
vertical-align: inherit;
}
I'm still looking for an hidden CSS who could add that alpha border, and will update my answer if I find anything.
border-collapse: collapse
? – Backspace<meta content='width=device-width; initial-scale=1.0;' name='viewport' />
in the<head>
. – Killough