0

有人可以告诉我我在这里做错了什么吗?我希望我的背景图像移动到它的 div 的末尾而不是它之外。

'rule-btm.png' 超出了#wrap-content。

#wrap-page{
  margin:auto; <-- This is to center the content on the page
  min-width:1170px;
  max-width:1280px;
}

#wrap-content{
  margin:0 5px; <--This is for a margin around my content
}

#tagline:after {
    background: url("rule-btm.png") repeat-x;
    content: "";
    float: left;
    height: 7px;
    max-width: 1280px;
    min-width: 1170px;
}

我只是好奇,所以我会问。将#wrap-page 和#wrap-content 都向左浮动对我来说是否正确?


<div id="tagline">
  <div></div>
  <div>Test</div>
  <div></div>
</div>

编辑: 我注意到如果我删除最小/最大宽度并用 just 替换它width,我可以让背景移动到需要的地方。

任何人?

4

1 回答 1

0

它不是Outside,它需要定位

例如

background: url("rule-btm.png") top left repeat-x;
于 2012-12-27T12:14:37.067 回答