I have a webpage with a markup looking something like this:
<body>
<div>Some content</div>
<div class="login">
<form>
<div>Some form elements</div>
</form>
</div>
<div>Some content</div>
</body>
My body
element has a background image on it.
I want the background of the .login
div to bee a blurred representation of the underlying body's background image.
The problem I had with the solutions found online is that set the background of the blurred div to the same as the body. The problem with this is that I use background-size: cover
on the body element so I can't position the background of the blurred div in the correct position.
Another problem was that the content of the blurred div always had the blurred background overlayed.
Is the a way to achieve this either using plain css or with the help of javascript?