title: Div Image not centered vertically and horizontally?
body: <p>My image is not centering with the heading at the top no matter what I try.
  If anyone can provide me with a code correction it would be greatly appreciated. Thanks in advance.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 675px;
    height: 418px;
    margin-top: -250px;
    /* Half the height */
    margin-left: -250px;
    /* Half the width */
  }
  
  body {
    background-color: black;
  }
  
  h1 {
    color: white;
    text-align: center;
  }
  
  p {
    color: white;
    font-family: verdana;
    font-size: 20px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h1&gt;Text&lt;/h1&gt;
  &lt;div class="img"&gt;
    &lt;img src="rsz_damon600.png"&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>