I'm trying to create a datagrid and stumbled on two problems.
I had to use border-collapse: separate; to get round corners on top. But by doing that I lost the ability to add borders on tr botton.
Any insights?
http://fiddle.jshell.net/KNb7K/
css:
table.dgrid { border: solid 1px #CDCDCD; .border-radius(8px, 0px, 0px, 8px); width: 100%; border-collapse: separate; } table.dgrid th:first-child{ .border-radius(0px, 0px, 0px, 8px); } table.dgrid th:last-child{ .border-radius(8px, 0px, 0px, 0px); } table.dgrid th{ background-color: #E6E6E6; } table.dgrid tr th:last-child, table.dgrid tr td:last-child{ border-right: 0px; } table.dgrid tbody tr:last-child { border-bottom: 0; } table.dgrid tr { border-bottom: solid 1px #CDCDCD; border-collapse: collapse ; } table.dgrid th, table.dgrid td { padding: 5px; text-align: center; vertical-align: middle; border-right: solid 1px #CDCDCD; } html:
<table class="dgrid"> <thead> <tr> <th>Ativar</th> <th>Imagem</th> <th>Posição</th> <th>Link</th> <th>Excluir</th> </tr> </thead> <tbody> <tr> <td><input type="checkbox" /></td> <td></td> <td></td> <td><input type="text" /></td> <td></td> </tr> <tr> <td><input type="checkbox" /></td> <td></td> <td></td> <td><input type="text" /></td> <td></td> </tr> <tr> <td><input type="checkbox" /></td> <td></td> <td></td> <td><input type="text" /></td> <td></td> </tr> </tbody> </table>