Click to See Complete Forum and Search --> : multiclassing and sprites


TheCowGoesMoo
07-24-2009, 01:04 PM
So I've got the layout as

<div class="box">
<div class="bordertop"></div>
Stuff goes here
<div class="borderbottom"></div>
</div>

and the css is

div.bordertop {
background: url(images/box.png) no-repeat 0 0;
}

div.borderbottom {
background: url(images/box.png) no-repeat 0 -20px;
}

The question is, is there a way to load box.png only once and have it referenced in both top and bottom? I've tried a number of different things and they all end up not working.

Andyram2k
07-24-2009, 05:09 PM
Hi TheCowGoesMoo,
Have you got a live example, so we can see the graphic please? Cheers.