3

Possible Duplicate:
Can I have multiple background images using CSS?

Is it possible to use 3 different background images in a div? Imagine a div where the far left is one image (that does not repeat), the middle is another image that repeats horizontally, and the far right is yet another image that does not repeat. (In much the same way as the header/content/footer model works vertically.)

If it's not possible please show me alternative ways - every way I have tried thus far has failed.

enter image description here

Community
  • 1
  • 1
Sveta26
  • 541
  • 2
  • 8
  • 19

2 Answers2

3

With CSS3, it is possible.

http://www.css3.info/preview/multiple-backgrounds/

Thing is, People with IE7 and IE8 wont see it... But those with the lastest versions of chrome, firefox, safari, opera, and I think IE9 will be able to see it.

So what is your public?

See this chart: http://caniuse.com/#search=multiple%20backgrounds

Fredy31
  • 2,660
  • 6
  • 29
  • 54
0

You could actually do this without adding too much extra markup (if any) using the sliding doors technique. This technique is compatible in all browsers.

HTML:

<div class="outer">
    <div class="inner">
        ...
    </div>
</div>

CSS:

.outer { /* Apply "left door" styles here */ }
.inner { /* Apply "right door" styles here */ }

Let me know if you have any questions/problems with this.

Wex
  • 15,539
  • 10
  • 64
  • 107