set background image for div css code example
Example 1: how to add a background image in html
<!-- HTML -->
<div id="imageDiv"></div>
<!-- CSS -->
<style>
#imageDiv {
background-image: url('someimage.png');
}
</style>
Example 2: background image for div in grid system bootstrap
.img {
margin-right: -15px; // Remove right gap
margin-left: -15px; // Remove left gap
padding-bottom: 62.5%; // ratio is 16:10
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
}