I've facing an issue which I'm sure has an easy solution yet I can't find it.
I've got two divs. The first one has a background image blurred and content inside. It works perfectly fine. But the second div instead of going after the first one goes under it.
Here is my code :
<div class="section1">
<!-- Content here -->
</div>
<div class="section2">
<!-- Content here -->
</div>
And my CSS:
.section1 {
display: flex;
flex-direction: column;
position: fixed;
left: 0;
right: 0;
z-index: 0;
height: 100%;
margin-top: 100px;
}
.section1:before {
content: "";
background: url('/images/background.jpg') center center;
height: 100%;
position: fixed;
left: 0;
right: 0;
z-index: -1;
display: block;
filter: blur(5px);
}
.section2 {
padding: 50px 0;
display: flex;
flex-direction: row;
flex: 1;
background-color: #FF5D63;
}
I've added a margin-top in section1 for the sake of the demonstration. The result is shown in the image below :