table-responsive class does not take full width
See original GitHub issueThis was previously reported in #24256, which was closed after #24438 was merged. However, that merge was only documentation, and the issue doesn’t actually appear to be fixed in Beta 2.
A table with the table-responsive
class will not render at full width. I’m not sure why it works in the example in the docs, but this codepen demonstrates that the issue still persists.
<table class="table table-responsive">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Link</th>
</tr>
</thead>
<tbody>
<tr>
<td>David</td>
<td>Developer</td>
<td>None</td>
</tr>
</tbody>
</table>
The issue occurs on both Firefox 58 and Chrome 62.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Bootstrap 4 responsive tables won't take up 100% width
It's caused by the table-responsive class giving the table a property of display:block , ...
Read more >How To Create a Full Width Table - W3Schools
Learn how to create a full-width table with CSS. A table that does not have a set width: ... Get certified by completing...
Read more >Displaying Responsive Tables that are not Full Width
I would like to display a table with no wrapping and collapsible columns (+/- buttons), and at the same time have the column...
Read more >Bootstrap 4 table responsive - examples & tutorial.
The width of the columns will automatically adjust to the content of the column. This means that it will always take up the...
Read more >Tables - Bootstrap
Use .table-responsive{-sm|-md|-lg|-xl} as needed to create responsive tables up to a particular breakpoint. From that breakpoint and up, the table will behave ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
simple solution, use a wrapping
<div>
with thetable-responsive
class.In the documentation examples, the reason it appears to “work” is that there is enough content in the table to force it to full width inside the container. Remove a few columns in the example table and you will see that it doesn’t span full width.