Is there a way to set an image as a background that will work effectively with multiple different mobile screen resolutions without distorting or cropping the image? For example, if I want the image to display correctly on both iPhone4 and iPhone6 without cutting off any part of it. Is there a way to show the middle of the image rather than only half of it along with half white space?
.landing-page{
background: url(../img/landing-portrait.jpg);
background-size: cover;
background-repeat: no-repeat;
width: 100%;
height: 80%;
margin: 0;
}
Currently, using the above code displays almost half of the image with white space below. Adjusting the height to 100% causes the image to enlarge unevenly and pushes the content away from being centered. Any ideas on how to solve this issue?