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

时间:2012-12-27 11:03:24

标签: css

有人能告诉我这里我做错了什么吗?我希望我的背景图像能够移动到它的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>

修改 我注意到,如果我删除最小/最大宽度并将其替换为width,我可以将背景移动到需要的位置。

任何?

1 个答案:

答案 0 :(得分:0)

它不在外面,需要定位

例如

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