I have a small div box inside a main div. The main div uses a background image. I want to add some text in the box div and a background image, so that the background image appears only in the empty area after the text.
So it would be like the text in the box has the background image of main div and the rest of the empty area inside the box div has another background image. Here's the html:
<div class="main">//width = x
<div class="box"> //width = x
<span class="text">Text, no bg. </span> // width = y
<!-- need bg here in x-y area.-->
</div>
</div>
hope it makes sense.
Edit: Please check my Jsfiddle link here: http://jsfiddle.net/zr9Ks/ All I'm trying is to have same background as the main div under the span inside the box div, and push the box div bg after the text.
boxhave a fixed height?