Emanuele Cipolla Emanuele Cipolla - 8 months ago 60
CSS Question

spectrum.js flat colorpicker - position:fixed header

I am using the spectrum.js flat colorpicker in a page that has a

header. The picker choices overlap the header while scrolling the page.

I have found this issue, but it seems to me that it applies to a picker contained into a fixed container, and not the other way round.

Thank you for your help.


With the F12 tools, I see that the color picker container has the sp-container class. In spectrum.css, the style defined for that class shows the following z-index property:

.sp-container {
    z-index: 9999994;

If you set z-index: 9999995 (or more) for the fixed header, the color picker box will not overlap it.