Why z-index is not working for div?

后端 未结 4 1883
我在风中等你
我在风中等你 2021-02-05 08:01

I am trying to get my footer to show on top of the footer background, but z-index seems not to be working. Does anyone see what is wrong with it? http://jsfiddle.net/f2ySC/

4条回答
  •  你的背包
    2021-02-05 08:17

    On footerBox set the position attribute to absolute Your new code should read as follows

    .footerBox {
        background-color: #FFFFFF;
        border: 10px solid #DDDDDD;
        margin: 10px 0 -200px -10px;
        width: 1185px;
        z-index: 1000;
        position: absolute;
    }
    

    See a demo here

    Using position: relative also works

提交回复
热议问题