-
-
Save Samnan/1046247 to your computer and use it in GitHub Desktop.
Here's how to do a table with rounded corners in CSS3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import compass/reset | |
@import compass/css3/border-radius | |
table | |
border: none | |
border-collapse: separate | |
th, td | |
padding: 5px | |
thead | |
background-color: #f2f6fa | |
th | |
border: 1px solid #ccc | |
border-left: none | |
&:first-child | |
border-left: 1px solid #ccc | |
+border-radius(5px 0px 0px 0px) | |
&:last-child | |
border-right: 1px solid #ccc | |
+border-radius(0 5px 0px 0px) | |
tbody | |
tr | |
td | |
border-right: 1px solid #ccc | |
border-bottom: 1px solid #ccc | |
&:first-child | |
border-left: 1px solid #ccc | |
&:last-child | |
td | |
&:first-child | |
+border-radius(0px 0px 0px 5px) | |
&:last-child | |
+border-radius(0px 0px 5px 0px) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<thead> | |
<tr> | |
<th>name</th> | |
<th>email</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td>john</td> | |
<td>john@domain.com</td> | |
</tr> | |
<tr> | |
<td>jane</td> | |
<td>jane@domain.com</td> | |
</tr> | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment