Created
July 24, 2012 00:42
-
-
Save oksushi/3167203 to your computer and use it in GitHub Desktop.
Table with varying widths
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 with varying widths | |
*/ | |
table { | |
width: 100%; | |
border: 1px solid hotpink; | |
border-collapse: collapse; | |
table-layout: fixed; | |
border-spacing: 1em; | |
} | |
td, | |
th { | |
width: 100px; | |
border: 1px solid lime; | |
text-align: left; | |
} | |
td:nth-child(3), | |
th:nth-child(3), | |
td:nth-child(5), | |
th:nth-child(5){ | |
width: auto; | |
} |
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> | |
<tr> | |
<th>Item</th> | |
<th>Item</th> | |
<th>Item</th> | |
<th>Item</th> | |
<th>Item</th> | |
</tr> | |
<tr> | |
<td>Thing</td> | |
<td>Thing</td> | |
<td>Thing</td> | |
<td>Thing</td> | |
<td>Thing</td> | |
</tr> | |
</table> |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment