I'm trying to make a background for a header that with a parallax effect in multiple layers of backgrounds creates a 3d effect. The problem is that the div where the layer is located never has a height greater than 0 pixels, so you never see the background.
This is what I have in the html:
<header id="hero">
<div id="parallax layer_1_header"></div>
<div id="parallax layer_2_header"></div>
<div id="parallax layer_3_header"></div>
</header>
And this in the css:
#hero{
background: linear-gradient(black 0%,#1c312f 65%);
height: 850px;
}
.layer_1_header, .layer_2_header, .layer_3_header{
position:absolute;
}
.layer_1_header{
background: url(../img/mountain.png)bottom/cover no-repeat;
width:120%;height:850px;margin:-10% 0 0 -10%;
}
Does anyone know what I'm doing wrong?
thanks