jQuery-UI's autocomplete not display well, z-index issue

Martijn picture Martijn · Jul 20, 2011 · Viewed 76.6k times · Source

I'm currently implementing jQuery UI's autocomplete in my clients webshop. The problem is: the element the autocomplete resides in, has a higher z-index then the z-index of the autocomplete. I tried setting the autocomplete z-index manually, but I've got the feeling that jQuery UI is overwriting this.

In fact my question is a duplicate of autocomplete suggestion list wrong z-index, how can i change?, but since there was no answer I thought about giving it another try.

Any help is welcome!

Martijn

Answer

Ranch picture Ranch · May 20, 2012

Use z-index and !important

.ui-autocomplete { position: absolute; cursor: default;z-index:30 !important;}