add class to background image

I have added the style “background-position: center center;” and it work perfectly!

So the new code will look like this:

<?php
    global $post;
    $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' );
?>
<div class="mainblogwrapper" style="background-image: url(<?php echo $src[0]; ?> ) !important; background-attachment : fixed;background-position: center center;">