You can make it align horizontally using
margin: 0 auto;
CSS ( , IE6/7). .
, jQuery. , JavaScript. , , JS/, .
CSS - display: table-cell ( - display: table).
<div id="container"><img src="my-image.png" alt="" /></div>
jQuery, ( plexus)
var imageSrc = $('#container img').attr('src');
$('#container').css({ backgroundImage: 'url(' + imageSrc + ')', backgroundPosition: 'center enter' });