I have a webpage with a parallax scrolling effect where the CSS property height: auto;
isn't working in any of the classes for any of the three background images. When I use height: auto;
the image disappears. The dimensions of the three uploaded images are each w = 1280px
and h = 800px
. If I use height: 641px
then the images scale down proportionally to w = 1025px
and h = 641px
. If I use a different height then the width is still 1025px but the height changes to what is in the CSS. The three CSS classes are:
.bgimg-1 {
background-image: url("https://c2.staticflickr.com/8/7321/27335183304_11cd309852_b.jpg");
max-width: 100%;
height: 641px;
}
.bgimg-2 {
background-image: url("https://c2.staticflickr.com/8/7632/27335194304_72890c2d62_b.jpg");
max-width: 100%;
height: 641px;
}
.bgimg-3 {
background-image: url("https://c2.staticflickr.com/8/7436/27947379025_844956bcf0_b.jpg");
max-width: 100%;
height: 641px;
}
The page and its HTML and CSS using height: 641px;
can be viewed at http://codepen.io/mlswartz/full/NrpzpN/. This needs to be fixed so that it's properly image responsive. I'm using Bootstrap 3.3.6 and Font-awesome 4.6.3. The monitor I'm using has a 5:4 aspect ratio with a screen resolution of 1280 x 1024.