title: How can I center an image in Bootstrap?
body: <p>I am struggling to center an image using only Bootstrap's CSS-classes. I already tried several things. One was adding Bootstrap CSS-class <code>mx-auto</code> to the <code>img</code> element, but it does nothing.</p>
  
  <p>Help is appreciated.</p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-4 mx-auto"&gt;
              &lt;img class=""...&gt; &lt;!-- center this image within the column --&gt;
  
              &lt;form...&gt;
  
              &lt;p...&gt;
              &lt;p...&gt;
              &lt;p...&gt;                
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>