I have different size background images in width and height (800x1200 600x800). I want to resize the image to full size without distortion to fit into the div. Can anybody tell me how to implement this in css. I have tried below ways but it is not occupying the full div width. can anybody tell me how to do this?
.example1 {
border: 2px solid black;
padding: 0;
background: url(mountain.jpg);
background-repeat: no-repeat;
background-size: contain;
}