Is there a way to assign multiple backgrounds to a single element DIV.
The idea being to have rounded corners on the top and bottom of a div with a straight background image in the middle.
Two images —
cbmain.png has the corners and cbmains.png is a straight image. They are both transparent and I hope there is a way of managing this in CSS.
Something like ::
background-top:url(example.com/images/cbmain.png) 960px 10px;
background:url(example.com/images/cbmains.png) 960px;
background-bottom:url(example.com/images/cbmain.png) 960px 10px;
Unfortunately multiple-background is a CSS3 thing. I already tested and worked with it on IE9, Firefox, Chrome, Opera, Safari. Your code with the CSS3 syntax would be something like:
Also I suggest you a graceful degradation using Modernizr for those old IE:
Another approach (that I don’t like) is using any polyfill to force IE6, IE7 and IE8 to work as IE9. Wich can cause problems, memory leaks, etc, etc, etc.