title: How to keep aspect ratio of a background-image?
body: <p>I've tried to look at other answers but no help. My background is dynamic so the size of images will change, so I need to keep aspect ratio so the whole image is seen. here's my CSS:</p>
  
  <pre><code>.image_submit_div {
      border: 1px solid #ccc;
      display: inline-block;
      padding: 20px 50px;
      width: 55%;
      height: 320px;
      cursor: pointer;
      background: url('something.jpg'); /* this changes */
      margin: 0 0 25px;
  </code></pre>
  
  <p>}</p>
  
  <p><strong>html</strong></p>
  
  <pre><code>&lt;label for="id_image" class="image_submit_div"&gt;
  </code></pre>
  
  <p>At the moment depending on the image, sometimes alot of it is cut off. I want the image to be downsized so it can be seen fully. Any idea?</p>