背景图像的div位置

时间:2012-02-17 22:56:16

标签: css html position

网站JN-Racing上的

我在左侧添加了一个div,但是当我调整浏览器大小时,div会查看内容。感谢所有tipps

1 个答案:

答案 0 :(得分:1)

试试这个:

#bg_right {
    background-image: url("images/bg_rechts.jpg");
    background-repeat: no-repeat;
    float: right;
    height: 935px;
    position: relative;
    width: 258px;
    z-index: -1;
}
#bg_left {
    background-image: url("images/bg_links.jpg");
    background-repeat: no-repeat;
    float: left;
    height: 935px;
    position: relative;
    width: 258px;
    z-index: -1;
}

#wrapper {
    height: 0;
    margin: auto;
    text-align: left;
    width: 1024px;
}

body {
    height: 100%;
    margin: auto;
    width: 1540px;
}

如果限制身体的宽度,它应该像魅力一样! (:

相关问题