背景图像经过我的页面包装器



谁能告诉我我在这里做错了什么?我希望我的背景图像移动到它的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>
编辑:

我注意到,如果我删除min/max-widths并将其替换为width,我可以让背景移动到需要的地方。

有人知道吗?

它不是在外面,它需要被定位

例如

background: url("rule-btm.png") top left repeat-x;

最新更新