z-index being improperly set
See original GitHub issueI’m using bootstrap-datepicker in a project where it sits next to another widget.
In Safari, the z-index is being manually set to 10. However, the widget that it sits next to is set to 999. So whenever the date picker drop down is displayed, it shows up UNDER the widget next to it.
In Firefox, the z-index is not set, so this behavior is not apparent.
Solution:
you are already attaching a .datepicker-dropdown
class to the drop down. Simply let us developers customize that class with our own z-index value so that we can make sure it is properly positioned on our pages.
Don’t manually set it in code.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
4 reasons your z-index isn't working (and how to fix it)
Check that the elements have their position set and z-index numbers in the correct order. Make sure that you don't have parent elements...
Read more >z-index not working with fixed positioning - Stack Overflow
This happens because the z-index property is ignored in position: static; , which happens to be the default value; so in the CSS...
Read more >What The Heck, z-index?? - Josh W Comeau
In general, z-index only works with "positioned" elements (elements that set position to something other than the default “static”). But the ...
Read more >The Z-Index CSS Property: A Comprehensive Look
This is caused by the positioned element wrapping the grey box. Those browsers incorrectly “reset” the stacking context in relation to the ...
Read more >Stop (ab)using z-index - Codegram
That developer must have been really desperate, but it's very common to see things like z-index: 9999 , and if that doesn't work,...
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 have a situation where a sibling element (not parent) is absolutely positioned. In this rare case, hardcoding the z-index with
!important
works i.e.Tried on the last version and it looks fine.