Dropdown inside responsive table row clipped even with data-bs-boundary set
See original GitHub issueA dropdown inside a responsive table row gets clipped even with data-bs-boundary set
Removing the table-responsive class from the parent div solves the issue, but we lose responsiveness.
Another workaround is to add style=“position:static” to the dropdown class div, and it doesn’t clip after.
Not sure if that’s expected or should be considered an issue.
OS: Ubuntu 20.04 Browser: Firefox 87 Bootstrap: bootstrap@5.0.0-beta3
Example:
<div class="table-responsive">
<table class="table">
<tr>
<td>
<div class="dropdown">
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink"
data-bs-toggle="dropdown"
data-bs-boundary="viewport"
aria-expanded="false"
>
Options
</a>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<li><a class="dropdown-item" href="#">Item</a></li>
<li><a class="dropdown-item" href="#">Item</a></li>
<li><a class="dropdown-item" href="#">Item</a></li>
<li><a class="dropdown-item" href="#">Item</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="#">Item</a></li>
</ul>
</div>
</td>
</tr>
</table>
</div>
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Bootstrap button drop-down inside responsive table not visible ...
I solved myself this and I put the answer in scope to help other user that have same problem: We have an event...
Read more >Dropdown menu inside a cell...problem with overflow
I'd like to insert different dropdown menu inside a cell in datatables. Without this CSS code: .table-responsive, .
Read more >Dropdowns - Bootstrap
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown ...
Read more >Stop Bootstrap drop menu's being cut off in responsive tables
Bootstrap's dropdown menu's a great for display items in a tidy way but suffer for being cut off when on mobiles due to...
Read more >Bootstrap Dropdown clipping at bottom of table - HTML & CSS
Hi guys Has anyone found an elegant (or even, a not so elegant solution) ... in sperate table cells for each row I...
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 FreeTop 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
Top GitHub Comments
I think this is expected, due to
overflow-x: auto
in.table-responsive
. Anyways, here’s an example codepen.@mrlife I just tested it in the codepen above and it still works. You can add position: static to the .dropdown div and it should not clip anymore.
Update: you can use
position-static
class as a shorthand