title: center a block in which it is applied display inline-block
body: <p>I have a div which contains an img now I would center it but if I try <code>margin: 0 auto</code> it doesn't work.</p>
  
  <pre><code>&lt;div style="display: inline-block"&gt;
  
     &lt;img src=""/&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>how can I center the entire div including also the img?</p>