css image size scale to fit code example
Example 1: make a background image responsive css
html {
min-height: 100%;
background-image: url(image.jpg);
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}
Example 2: resize img to fit
img {
max-width:100%;
height:auto;
}
Example 3: make image stretch to fit div
Just apply without any changing any code
img {
width: 100%;
}