z-index not working properly

前端 未结 1 1054

So I am making a site and I have a top bar with some box shadow. I then have a description box directly underneath. So I set the z-indexes to ensure that the top bars box-shadow

相关标签:
1条回答
  • 2021-01-28 19:34

    Add position: relative to both elements. z-index only affects positioned elements.

    Updated JSFiddle: http://jsfiddle.net/BAW23/3/

    0 讨论(0)
提交回复
热议问题