If you want to use a repeating image as a background, you should use
div {line-height: 24px; /* equal to the height of the image */
}
and then all other images (in your case content-Top.png
and content-Bottom.png
) should be multiples of that image-, or line-, height. The problem you're having, I think, is that the bottom image is 31px tall, the top image is 41px tall and the repeating image is 24px tall. Those heights aren't going to mesh well.
Javascript can resolve this, but you'll probably find it easier to simply edit your images so that they share common heights.
I think <br />
is equal to one line-height, and padding/margins between <p>
tags should be adjusted to be equal to one (or whole multiples of) the line height to preserve the theme.
A List Apart has a good article on this kind of thing over here: http://www.alistapart.com/articles/settingtypeontheweb.
Also, because sometimes I just can't stop myself (ah, insomnia, my old enemy...), I cobbled together a demo-page for you, with the CSS on-page for your perusing-pleasure: http://www.davidrhysthomas.co.uk/so/notebook.html