Resizing issue with vh units
I have a parallax div section and when I resize to mobile view a gap develops between the 2 containers.
Here are the 2 divs flush against each other: http://prntscr.com/fk5tqn
Once I scroll down you see a gap: http://prntscr.com/fk5v58
- The gap only appears when window is sized narrower not wider.
CSS: [PHP] @charset "utf-8"; @import url("../webfonts/SourceSansPro_Regular/stylesheet.css - Pastebin.com
Markup: [PHP] <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta - Pastebin.com
Parallax Javascript: [PHP] $(window).scroll(function(e) { parallax(); }) function parallax() { - Pastebin.com
URL: Supreme Fireplaces - Galaxy Clean Face
If you reduce browser width down to tablet you'll see the gap emerge, its more evident if you scroll down a bit between the second image and the Awards section. http://prntscr.com/fk5ysz
I would just like the elements to be flush against the image div if possible, I'm using "vh" as height unit for both the containers, not sure if that makes a difference.
Thanks for your help.
.container-galaxy {
width: 100%;
height: 90vh;
background-image: url(../images/products/galaxy/galaxy_cover.jpg);
background-size: cover;
background-position: center 0px;
background-repeat: no-repeat;
clear: both;
}
.container-galaxy2 {
width: 100%;
height: 80vh;
background-image: url(../images/products/galaxy/galaxy_semi_classic_cover.jpg);
background-position: center 1000px;
background-repeat: no-repeat;
background-size: cover;
border-color: #666;
clear: both;
}
----------
Brandon
