This works just fine if img is not set to absolute:
div img {
filter: blur(5px);
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-
put your blur element in a container like this:
then instead of using height:100%
and width:100%
use like this:
.container{
position:relative;
width:300px; /* this is an example */
height:300px; /* this is an example */
overflow:hidden;
}
#background {
left:-15px;
right:-15px;
top:-15px;
bottom:-15px;
/* other styles */
}
you need to remove 15px
(or more/less) from each side of your element.
DEMO - Full DEMO