Hi all,
I'm trying to do something rather complicated. I have an image (of a book) which I am trying to make stretch vertically to fit its content. Prior to this, I simply had the book as the background image of a div with the content in the div. That worked, but I've got to the point where I need more space!
So, I've created three parts of the book image. The top (a large ~300px tall image), a central piece (64px tall, tileable) and the bottom piece (again, about 300px tall). What I'd like to do is make it so that the content sits on the top piece, and if it overflows the tile will come into effect. The bottom piece won't contain any content.
An illustration:
The blue band at the top represents the top of the book. The purple bands represent the tile and the pinky band represents the bottom of the book. The light blue is the content. Any ideas how I could do this? I've tried all sorts and I'm pretty stumped!
(One idea I thought might work would be to contain the top piece and the tile within a div each, both of which are contained in a single div. The content would be in the top-level div also -- but I haven't been able to get it so the content sits on top. Frustrating!)
Cheers,
xyphic
I'm trying to do something rather complicated. I have an image (of a book) which I am trying to make stretch vertically to fit its content. Prior to this, I simply had the book as the background image of a div with the content in the div. That worked, but I've got to the point where I need more space!
So, I've created three parts of the book image. The top (a large ~300px tall image), a central piece (64px tall, tileable) and the bottom piece (again, about 300px tall). What I'd like to do is make it so that the content sits on the top piece, and if it overflows the tile will come into effect. The bottom piece won't contain any content.
An illustration:

The blue band at the top represents the top of the book. The purple bands represent the tile and the pinky band represents the bottom of the book. The light blue is the content. Any ideas how I could do this? I've tried all sorts and I'm pretty stumped!
(One idea I thought might work would be to contain the top piece and the tile within a div each, both of which are contained in a single div. The content would be in the top-level div also -- but I haven't been able to get it so the content sits on top. Frustrating!)
Cheers,
xyphic