Z-index issue on ngb-dropdown with container="body"
See original GitHub issueBug description:
- Z-index is wrong when ngb-dropdown is loaded in a modal and
container="body"
Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/edit/ngb-dropdown-index
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 7.0.0 ng-bootstrap: 4.1.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Ng bootstrap dropdown not in front - Stack Overflow
I solved it by placing relative and absolute containers around the dropdown, and applying z-index inside the dropdown:
Read more >Dropdown - Angular powered Bootstrap
Useful mainly when dropdown is attached to the body. If the dropdown is inline just use <div ngbDropdown class="custom-class"> instead. Type: string.
Read more >Diagnosis: z-index (submenu hidden behind content)
z -index values are relative to their element's siblings only; outside of that parent container, they have no effect. So if Element B...
Read more >Z-index · Bootstrap v5.0
While not a part of Bootstrap's grid system, z-indexes play an important part in how our components overlay and interact with one another....
Read more >Fix dropdowns z-index · 8b57efbf1b - PeerTube - Rita Git
Fix dropdowns z-index ... <ng-container *ngFor="let actions of getActions()"> ... <div *ngIf="owned" class="more dropdown-root" ngbDropdown ...
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
Any update for this?
@benouat Needed if you have a scrollable div in the modal!