Need to fit an image inside div without making image as background image of the div
My code as follows
<div style="display:none" id="previewImage" height="300px" width="300px">
<img src="" id="previewImg" height="400px" width="450px">
</div>
<div>
<input type='file' class="inputfile" name='file' id='file' size='50' accept='image/*' />
<input type='submit' value='Upload' name='Upload image'/>
</div>