开发者

Multiple Background Images in IE, Using CSS to create multiple background images in IE

开发者 https://www.devze.com 2023-03-28 19:12 出处:网络
This is my first time posting here. I have a problem. I\'ve been trying for ages to get multiple background images to work in both Chrome/Safari and IE. Of course it works in all browsers except IE.

This is my first time posting here. I have a problem. I've been trying for ages to get multiple background images to work in both Chrome/Safari and IE. Of course it works in all browsers except IE.

This my code:

#container {
  width: 828px;
  margin: auto;
  padding: 0;
  text-align: left;
  position: relative;
  overflow: visible;
  background-image: url('images/body.png'), url('images/filler.png');
  background-repeat: no-repeat, repeat-y;
}

The reason I am using two background images is because I want th开发者_高级运维e illustrated part to stay at the top, and have the white page background in the same div layer repeat when more content is added.

Right now this code works perfectly in Chrome, but NEITHER of the background images show up in Internet Explorer.

Help?


If it´s possible I suggest you use two container elements.

HTML

<div id="container">
  <div id="inner-container">
  </div>
</div>

CSS

#container {
  background: url('images/filler.png') repeat-y;
}
#inner-container {
  background: transparent url('images/body.png') no-repeat left top;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消