.table-responsive class do in Bootstrap?.table-responsive class in Bootstrap.The .table-responsive class wraps a table and adds horizontal scrolling on small devices. This prevents the table from breaking the layout by overflowing the screen width.
The table-responsive-md class applies horizontal scrolling only on screens smaller than the md breakpoint (768px). Larger screens show the table normally.
<div class="table-responsive"> <table class="table"> <thead> <tr><th>Name</th><th>Age</th><th>City</th></tr> </thead> <tbody> <tr><td>Alice</td><td>30</td><td>New York</td></tr> <tr><td>Bob</td><td>25</td><td>Chicago</td></tr> </tbody> </table> </div>
.table-responsive wrapper does on small screens.The .table-responsive wrapper adds horizontal scrolling on small screens, so the table remains in a row format but can be scrolled sideways.
.table-responsive containers?.table-responsive in Bootstrap.The selector .table-responsive table selects any table element inside an element with class table-responsive, regardless of nesting depth.
Adding aria-label helps screen readers understand the table's purpose. Ensuring keyboard users can scroll horizontally is essential for accessibility.