mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
add tests for table grid sizing, solve bugs in fluid table grid sizing
This commit is contained in:
parent
27845e4492
commit
cd466f1d0b
7
docs/assets/css/bootstrap.css
vendored
7
docs/assets/css/bootstrap.css
vendored
@ -1753,6 +1753,13 @@ table {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
table [class*=span],
|
||||
.row-fluid table [class*=span] {
|
||||
display: table-cell;
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
table .span1 {
|
||||
float: none;
|
||||
width: 44px;
|
||||
|
@ -147,7 +147,15 @@ table {
|
||||
// TABLE CELL SIZING
|
||||
// -----------------
|
||||
|
||||
// Change the columns
|
||||
// Reset default grid behavior
|
||||
table [class*=span],
|
||||
.row-fluid table [class*=span] {
|
||||
display: table-cell;
|
||||
float: none; // undo default grid column styles
|
||||
margin-left: 0; // undo default grid column styles
|
||||
}
|
||||
|
||||
// Change the column widths to account for td/th padding
|
||||
table {
|
||||
.span1 { .tableColumns(1); }
|
||||
.span2 { .tableColumns(2); }
|
||||
|
@ -458,6 +458,73 @@
|
||||
</div><!--/row-->
|
||||
|
||||
|
||||
<h4>Grid sizing</h4>
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span3">1</th>
|
||||
<th class="span4">2</th>
|
||||
<th>3</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">1 and 2</td>
|
||||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td rowspan="2">2</td>
|
||||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">1</td>
|
||||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">2 and 3</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!--/row-->
|
||||
|
||||
<h4>Fluid grid sizing</h4>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span3">1</th>
|
||||
<th class="span4">2</th>
|
||||
<th>3</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">1 and 2</td>
|
||||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td rowspan="2">2</td>
|
||||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">1</td>
|
||||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">2 and 3</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!--/row-->
|
||||
|
||||
|
||||
|
||||
<!-- Forms
|
||||
================================================== -->
|
||||
|
Loading…
Reference in New Issue
Block a user