Reputation: 781
im trying to make rounded border table. but im getting little problem with border, the table border is not rounded..
grid1 { width:100%; border:1px solid #000}
here is the example http://jsfiddle.net/NHNFx/
<table class="grid1">
<tr>
<th>Salutation</th>
<td>MR</td>
</tr>
<tr>
<th>First Name</th>
<td>Greg</td>
</tr>
<tr>
<th>Last Name</th>
<td>Oden</td>
</tr>
</table>
table { border-collapse:collapse; border-spacing:0; border:0; }
.grid1 { width:100%; border:1px solid #000}
.grid1 tr th { width:115px; padding:20px; background:blue; border-bottom:1px solid #c8c8c8; border-right:1px solid #c8c8c8;}
.grid1 tr td { padding:20px; background:#f9f9f9; border-bottom:1px solid #c8c8c8; }
.grid1 tr:first-child th { border-radius:2em 0 0 0; }
.grid1 tr:last-child th { border-radius:0 0 0 2em ; }
.grid1 tr:first-child td:last-child { border-radius:0 2em 0 0; }
.grid1 tr:last-child td:last-child { border-radius:0 0 2em 0 ; }
plz help me...
Upvotes: 2
Views: 221
Reputation: 991
Try This
table {
border-collapse: separate;
border-spacing: 0;
}
table, td {
border: 1px solid #404040;
border-radius: 7px;
-moz-border-radius: 7px;
padding: 7px;
}
Upvotes: 1