Skip to content

Instantly share code, notes, and snippets.

@honda0510
Last active January 14, 2018 02:40
Show Gist options
  • Save honda0510/651be67f897d1a0448d6b951b6a04fe3 to your computer and use it in GitHub Desktop.
Save honda0510/651be67f897d1a0448d6b951b6a04fe3 to your computer and use it in GitHub Desktop.
入れ子テーブル with Bootstrap
<table class="table table-bordered table-striped">
<tr>
<td>cell</td>
<td class="has-table">
<table class="table table-bordered table-striped inner-table">
<col class="first">
<col>
<tr class="first">
<td>cell-11</td>
<td>cell-12</td>
</tr>
<tr>
<td>cell-21</td>
<td>cell-22</td>
</tr>
<tr>
<td>cell-31</td>
<td>cell-32</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>cell</td>
<td class="has-table">
<table class="table table-bordered table-striped inner-table">
<col class="first">
<col>
<tr class="first">
<td>cell-11</td>
<td>cell-12</td>
</tr>
<tr>
<td>cell-21</td>
<td>cell-22</td>
</tr>
<tr>
<td>cell-31</td>
<td>cell-32</td>
</tr>
</table>
</td>
</tr>
</table>
.table {
.has-table {
padding: 0;
.inner-table {
margin-bottom: 0;
border-width: 0;
col {
border-left: 1px solid rgb(221, 221, 221);
}
tr {
border-top: 1px solid rgb(221, 221, 221);
}
.first {
border-width: 0;
}
td {
border-width: 0;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment