我试图让我的内容的背景图像出现在页眉和页脚后面.目前,内容背景的顶部是伸展到标题上,您可以看到底部稍微覆盖了页脚(注意页脚边框颜色略有变化).我试过设置应用z-index:-100;对内容的工作,但也使文本不可选.然后我尝试应用z-index:1;到内容,但没有使内容出现在页眉/页脚下.
//html
content
goes
here
//css
header {
width: 100%;
height: 100px;
background: url(../img/top.png) repeat-x;
z-index: 110;
}
#wrapper #content {
color: #FFFFFF;
background: url(../img/body.png) repeat-y;
width: 524px;
padding: 25px 30px 25px 30px;
position: absolute;
bottom: 100px;
top: 90px;
margin: 0 0 0 150px;
z-index: 1;
}
footer {
margin: -107px 0 0 0;
width: 100%;
height: 107px;
background: url(../img/bottom.png) repeat-x;
z-index: 100;
}