title: How to center an image in the middle of a div?
body: <p>I need to center an image in a middle of a div.</p>
  
  <pre><code>&lt;div class="main"&gt;
      &lt;img...&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In the example below the image is centered, but not in the middle.<br /></p>
  
  <p><a href="https://jsfiddle.net/web_garaux/tng7db0k/" rel="noreferrer">https://jsfiddle.net/web_garaux/tng7db0k/</a></p>