我有以下标记:飘来背景DIV影响空间
<div id="container">
<img src="images/behind.png" id="behind" />
<div id="header">
</div>
</div>
具有以下样式: 的#container { 保证金左:自动; margin-right:auto; width:800px; }
#container #behind{
float: right;
margin-top: -50px;
margin-right: -20px;
}
#header {
border: #ACACAC 1px solid;
background: silver url('../images/headerbg.png') repeat-x;
height: 100px;
margin-top: 50px;
position: relative;
width: auto;
margin-right: 0px;
}
现在,这似乎是我想它;但是,当我将登录框添加到标题并将其右移时,它会移动到标题容器的右侧,但在#behind中大约200px,并且图像的宽度被填充到右侧。
对此提出建议?
嗨,亚当,欢呼声,但没有解决它。 – James 2011-01-14 07:00:48