title: Background-size cover/center not working
body: <p>I'm trying to center the background image to the div using <code>background-size: cover</code> and <code>background-size: contain</code>, but it does not work. I need to display background images inside HTML tags and use background-size in the css file, this is the code:</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>.container {
      width: 200px;
      height: 260px;
      position: relative;
      margin: 0 auto 40px;
      margin-left: 20px;
      display: inline-block;
  }
  .main{
      border: 1px solid black;
      background-color: #A6A6A6;
  }
  .card {
      width: 100%;
      height: 100%;
      position: absolute;
      border: 2px solid white;
  }
  .card div {
      height: 100%;
      width: 100%;
      color: white;
      text-align: center;
      position: absolute;
  }
  .card .front {
      background-repeat: no-repeat;
      background-position: center center;
      background-size: contain;
      -webkit-background-size: contain;
      -moz-background-size: contain;
      -o-background-size: contain;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body style="background-image:url(https://s3.amazonaws.com/Syntaxxx/background-gold-bokeh.jpg);"&gt;
  &lt;div class="main"&gt;
    &lt;section class="container"&gt;
        &lt;div class="card"&gt;
            &lt;div class="front" style="background-image: url('http://www.mobygames.com/images/covers/l/403626-injustice-2-playstation-4-front-cover.png');"&gt;
            &lt;/div&gt;
            &lt;div class="back"&gt;1&lt;/div&gt;
        &lt;/div&gt;
    &lt;/section&gt;
    &lt;section class="container"&gt;
        &lt;div class="card"&gt;
            &lt;div class="front" style="background-image: url('http://www.mobygames.com/images/covers/l/403651-the-surge-playstation-4-front-cover.jpg');"&gt;
            &lt;/div&gt;
            &lt;div class="back"&gt;2&lt;/div&gt;
        &lt;/div&gt;
    &lt;/section&gt;
  &lt;/div&gt;
            
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>