mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
Move .table-responsive to .table instead of as a parent
This commit is contained in:
parent
5ab99abd97
commit
967ee175dc
@ -442,8 +442,7 @@ Add `.table-sm` to make tables more compact by cutting cell padding in half.
|
|||||||
|
|
||||||
Use contextual classes to color table rows or individual cells.
|
Use contextual classes to color table rows or individual cells.
|
||||||
|
|
||||||
<div class="table-responsive">
|
<table class="table table-bordered table-striped table-responsive">
|
||||||
<table class="table table-bordered table-striped">
|
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col class="col-1">
|
<col class="col-1">
|
||||||
<col class="col-7">
|
<col class="col-7">
|
||||||
@ -487,7 +486,6 @@ Use contextual classes to color table rows or individual cells.
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bd-example">
|
<div class="bd-example">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@ -670,7 +668,7 @@ Regular table background variants are not available with the inverse table, howe
|
|||||||
|
|
||||||
## Responsive tables
|
## Responsive tables
|
||||||
|
|
||||||
Create responsive tables by wrapping any `.table` in `.table-responsive` to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.
|
Create responsive tables by adding `.table-responsive` to any `.table` to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.
|
||||||
|
|
||||||
{% callout warning %}
|
{% callout warning %}
|
||||||
#### Vertical clipping/truncation
|
#### Vertical clipping/truncation
|
||||||
@ -693,8 +691,7 @@ For more information, read [this Stack Overflow answer](https://stackoverflow.co
|
|||||||
{% endcallout %}
|
{% endcallout %}
|
||||||
|
|
||||||
<div class="bd-example">
|
<div class="bd-example">
|
||||||
<div class="table-responsive">
|
<table class="table table-responsive">
|
||||||
<table class="table">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
@ -736,10 +733,8 @@ For more information, read [this Stack Overflow answer](https://stackoverflow.co
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="table-responsive">
|
<table class="table table-bordered table-responsive">
|
||||||
<table class="table table-bordered">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
@ -782,14 +777,11 @@ For more information, read [this Stack Overflow answer](https://stackoverflow.co
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{% highlight html %}
|
{% highlight html %}
|
||||||
<div class="table-responsive">
|
<table class="table table-responsive"">
|
||||||
<table class="table">
|
|
||||||
...
|
...
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user