How do I set the "inner border" - the border between different cells.
By setting style attributes I manage to control the outer border, but the inner border just stays the same gray color and the sa开发者_Go百科me width. What attributes should I tweak to control the inner border?
For ordinary table markup, here's a short solution that works on all devices/browsers on BrowserStack, except IE 7 and below:
table { border-collapse: collapse; }
td + td,
th + th { border-left: 1px solid; }
tr + tr { border-top: 1px solid; }
For IE 7 support, add this:
tr + tr > td,
tr + tr > th { border-top: 1px solid; }
A test case can be seen here: http://codepen.io/dalgard/pen/wmcdE
You need to style the <td>
element.
Take a look at the W3C website
精彩评论