I need to make a div with background image of unknown size. Inside this div I need some content in the middle.
The problem is that I don't know the background image size.
I've found 2 solutions but I can't get it work together. First, how to automatically adjust div width/height ad its background:
<div style="background:url(...); background-size: contain;">
<img src="the_same_url" style="visilibity: hidden;">
</div>
Second how to vertically align How to vertically align an image inside div
And also the content should be wrapped in wrapper (width: 960px; margin: 0 auto); I cannot get it work together at all =\
So basically this thing is needed in order to create a block with some big background which will take 100% width of site and in the center there will be some content. But the size of this block will depend on background image
Also I can use jQuery but I can't figure out how