Trying to compress an image of 1658 by 1156 to a div of width : 800px; height:100%; as a background image
<p>I am trying to use an image of 1658 by 1156 as a background image to a div of width 800px and height 100%. My target is to compress down the image to the size of the width using css but the image still overlaps the size of the div. This is my attempt:</p>

<pre><code>&lt;div  style="margin: 0px; padding: 0px; width : 800px; height:100%" class="col-md-8 col-xs-8 col-lg-8"&gt;  

                    &lt;div class="panel panel-body" style="background-repeat: no-repeat; background-attachment: fixed; background-position: center; overflow-scroll: none; width : 800px; height:100%;z-index: 1;  padding:2px; border: black solid thin;background: url(resources/img/bck.JPG) center top"&gt;
</code></pre>

<p>Please how can I compress the image down to the size of the div    </p>