I'm currently attempting to blur the background image behind a div that has content in it. The problem is, this is supposed to be for a responsive design, so I need to use the cover property on the background image of the bigger box. There seems to be no way for me to match the image in the box inside to the one behind. I've tried making the bigger box relative, but then overflow:hidden doesn't work anymore on the smaller box.
<div class="container">
<div class="block">
<div class="blur">
</div>
<div class="content">
<h3>
A bunch of stuff
</h3>
<p>
This is supposed to be content.
</p>
<p>
That the box will wrap around
</p>
</div>
</div>
</div>
.container{
background: url('https://i.imgur.com/Q13QJrB.jpg') no-repeat center center;
background-size: cover;
width: 100%;
height: 100%;
overflow: auto;
}
.block{
width: 50%;
margin: 30px auto 30px auto;
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.40);
position: relative;
}
.blur{
background: url('https://i.imgur.com/Q13QJrB.jpg') no-repeat center center;
background-size: cover;
overflow: hidden;
z-index: 50;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
filter: blur(10px);
}
.content{
width: 100%;
height: 100%;
z-index: 100;
position: relative;
}
https://jsfiddle.net/hy0mvpec/30/
Most of the examples online I've seen either use some JS library, which in this case I don't want to use, fixed heights with absolute containers, or CSS properties that simply aren't implemented in modern browsers.
EDIT: Since people seem overly confused about what I want;
I want the background of the smaller box to be blurred. Most solutions seem to re-apply the background-image to the smaller box and try to have it match the bigger one so it seems like a seamless image.
I think the question should pertain more to making the background image seamless regardless of the size of the display.