2

http://dl.dropbox.com/u/13722201/Dorset%20Designs/index.html 正如您将看到,当您调整浏览器大小时,一切都会集中,直到浏览器边缘触及主 div,然后只有导航栏保持集中。我知道这是我的编码问题,但我找不到问题。这里也是css http://dl.dropbox.com/u/13722201/Dorset%20Designs/main.css

在此先感谢 Arran,16

4

1 回答 1

4

在您的样式表中进行以下编辑,请在下面找到它:-

#main {
    background: none repeat scroll 0 0 #0099FF;
    box-shadow: 0 5px 10px 3px #000000;
    height: 1600px;
    left: 0; /* right: 20px; this has been changed to 0;*/
    margin-left: auto;
    margin-right: auto;
    position: absolute;
    right: 0; /* right: 20px; this has been changed to 0;*/
    top: 0;
    width: 960px;
    z-index: -1;
}

编辑 - 解释:

因为你已经给了 right 和 left 值,20px因此它迫使它从左侧<div id="main">移动。20px20px就是在您调整浏览器大小以适应 div 时空间产生的共振。

于 2012-06-25T11:30:47.433 回答