[Solved] Making div responsive with margin 0 auto in it


It depend and what you want but fixed width and high margin isn’t the solution, you need another wrapper on your image for center them, and adjust your CSS:

<div id="responsivearea">
    <div class="img-center">
        <img class="wp-image-2520 alignleft" src="http://www.inspuratesystems.com/nayajeevan/wp-content/uploads/2014/11/good-employer.png" alt="good employer" width="201" height="199" /> 
        <img class="wp-image-2521 alignleft" src="http://www.inspuratesystems.com/nayajeevan/wp-content/uploads/2014/11/gift-of-health.png" alt="gift of health" width="201" height="199" /> 
        <img class="wp-image-2522 alignleft"  src="http://www.inspuratesystems.com/nayajeevan/wp-content/uploads/2014/11/Change-maker.png" alt="Change maker" width="201" height="199" />
    </div>
</div>

and the css :

#responsivearea{
    max-width: 900px; 
    margin: 0 auto; 
    clear: none;
    width: 100%;
    text-align: center;
}
.img-center{
    display:inline-block;
}
.alignleft{
    float: left; 
    clear: none;
}

here a fiddle : http://jsfiddle.net/x9jjqugd/1/

Hope I help !

0

solved Making div responsive with margin 0 auto in it