mirror of
https://github.com/jasny/bootstrap.git
synced 2026-02-04 02:55:28 -05:00
fix problems with scope in tables when using th in tbody
This commit is contained in:
@@ -11,11 +11,8 @@ table {
|
||||
width: 100%;
|
||||
margin-bottom: @baseline;
|
||||
padding: 0;
|
||||
border-collapse: separate; // Done so we can round those corners!
|
||||
*border-collapse: collapse; /* IE7, collapse table to remove spacing */
|
||||
font-size: @basefont;
|
||||
border: 1px solid #ddd;
|
||||
.border-radius(4px);
|
||||
border-collapse: collapse;
|
||||
th, td {
|
||||
padding: 10px 10px 9px;
|
||||
line-height: @baseline;
|
||||
@@ -29,9 +26,27 @@ table {
|
||||
}
|
||||
td {
|
||||
vertical-align: top;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
// When scoped to row, fix th in tbody
|
||||
tbody th {
|
||||
border-bottom: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// BORDERED VERSION
|
||||
// ----------------
|
||||
|
||||
.bordered-table {
|
||||
border: 1px solid #ddd;
|
||||
border-collapse: separate; // Done so we can round those corners!
|
||||
*border-collapse: collapse; /* IE7, collapse table to remove spacing */
|
||||
.border-radius(4px);
|
||||
th + th,
|
||||
td + td {
|
||||
td + td,
|
||||
th + td {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
tr td {
|
||||
@@ -89,10 +104,12 @@ table {
|
||||
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
||||
.zebra-striped {
|
||||
tbody {
|
||||
tr:nth-child(odd) td {
|
||||
tr:nth-child(odd) td,
|
||||
tr:nth-child(odd) th {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
tr:hover td {
|
||||
tr:hover td,
|
||||
tr:hover th {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user