Bootstrap: Z-Index issue on dropdowns

Created on 11 Mar 2016  路  3Comments  路  Source: twbs/bootstrap

There seems to be an issue with overlapping elements and z-index on button dropdown (possibly other components). I've created a JS Fiddle to reproduce. https://jsfiddle.net/qu1ewxau/

Note that the bottom input group overlays the upper dropdown.

Hint: click the hamburger.

Most helpful comment

I found a workaround. It would seem, if I remove the .btn-group parent completely, and rely solely on the .input-group (and change all the spans to divs to make the silly robots happy), the z-index is applied to the .btn instead of the .btn-group and life is good.

Updated example: https://jsfiddle.net/qu1ewxau/2/

All 3 comments

Hi @devdelimited!

You appear to have posted a live example (https://fiddle.jshell.net/qu1ewxau/show/light/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

  • line 92, column 17 thru column 39: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
  • line 122, column 17 thru column 39: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
  • line 83, column 13 thru column 36: The for attribute of the label element must refer to a non-hidden form control.
  • line 113, column 13 thru column 36: The for attribute of the label element must refer to a non-hidden form control.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(_Please note that this is a fully automated comment._)

I found a workaround. It would seem, if I remove the .btn-group parent completely, and rely solely on the .input-group (and change all the spans to divs to make the silly robots happy), the z-index is applied to the .btn instead of the .btn-group and life is good.

Updated example: https://jsfiddle.net/qu1ewxau/2/

Hi @devdelimited!

You appear to have posted a live example (https://fiddle.jshell.net/qu1ewxau/2/show/light/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

  • line 83, column 15 thru column 40: The for attribute of the label element must refer to a non-hidden form control.
  • line 111, column 15 thru column 40: The for attribute of the label element must refer to a non-hidden form control.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(_Please note that this is a fully automated comment._)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leomao10 picture leomao10  路  3Comments

IamManchanda picture IamManchanda  路  3Comments

knownasilya picture knownasilya  路  3Comments

kamov picture kamov  路  3Comments

matsava picture matsava  路  3Comments