You can place an image inside a div, and give it a width and height of 100%, this should make it resize with the div itself.
You however can't have it resize well with content, in which case you would usually have a background attached in a div instead, and have it repeat towards the bottom. But this is also not the "best" way, as it would fix the width of the container.
So it really depends on what exactly you want. If you want the image to actually resize, rather then simply repeat it self, thats not recommended. It would quickly become unsharpened in larger resolutions.
To maintain a flexible container, you would have to build the background in "layers", and even than you still have limits. But it dose somewhat "push" your limits with an extra tool to work with. The keywords are "z-index", and "position".
Simply build your background in layers from within Photoshop, Paint.net (or whatever you are using), then save each layer as a separate image, (or inside a css sprite). You would than use the first layer as the repeatable background, and place subsequent layers using absolute positioning inside the container.
For this to work you need to first position the container it self, i suggest using "position:relative;" for that, since it will keep the container in place, while allow for absolute positioning of child elements. These child elements should have z-index of 1, while the final content container should have a z-index of 2, (to avoid content being positioned visually below the other elements.).
Also. Someone claimed you had to use the width/height properties, which is just false. There is nothing wrong with just using CSS for your images alone. The only thing which might be effected is the rendering speed, since browsers may have to calculate the width/height on their own, which is like a few milliseconds. Obsessing about things at that level is really not worth your effort.