Safari ignores z-index value

痞子三分冷 提交于 2019-12-11 20:17:50

问题


Good morning,

I'm having trouble with a website I'm working on. I have a slider for my photos and drop down menu. It work fine on every other browser but in Safari my slider goes on top of the drop menu.

In Safari (Mac version),

In Other browsers,

I have added the z-index to my menu CSS as below (then it started working on other browsers)

#cssmenu {
  font-family: Montserrat, sans-serif;
  background: #333333;
  /*Always on top of everything*/
  z-index: 999;
}

回答1:


After doing a full browser cache clean, this CSS seems to have worked

#cssmenu {
    font-family: Montserrat, sans-serif;
    background: #333333;
    z-index: 999;
    position: relative;
}



回答2:


I had similar issue and while setting z-index on element (a thumbnail in my case) worked in all but Safari, I had to also set z-index on the containing div and now also works in safari.



来源:https://stackoverflow.com/questions/27071462/safari-ignores-z-index-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!