The background applied to the div using :before pseudo element did not apply to the entire div. This is the html & css code.
HTML
<section id="pages">
<div class="container">
...
...
....
</div
</section>
CSS
#pages {
display: flex;
align-items: center;
justify-content: center;
background: url(../img/background.png);
background-size: 100% 100%;
padding: 80px 0 0 0;
min-height: 100vh;
}
#pages:after{
content: "";
position: absolute;
left: 0; right: 0;
top: 0; bottom: 0;
background: rgba(0,0,0,.5);
}
The form is inside the container div and the pages section extends till the end of the page. I have uploaded the image of the web-page. Click here to see the image