I’m using a css style to make a blur effect but the blur isn’t covering the whole div.
Should i add something to the code to fix this, or is there another solution?
That’s how blur works. Either on an image you’ll get blurred edges http://codepen.io/grayghostvisuals/pen/Ivpto either on a bg image you’ll get unblurred edges; or white edges. Because blur is calculated by duplicated and moved around pixels. So either it gets polluted by white pixels out of element, either it can’t fully calculate it on an element that doesn’t have all neighbours.
in orderto have the full bg blurred you need to nest your element in another one that’s overflow hidden and enlarge the nested one with negative margins, I guess.
I’m doing some blur effects on something I’m working on, and here’s what I’ve learned so far.
I have to construct my divs differently. One must create an overall div that contains other divs and MASKS those divs’ content that extends beyond its borders, using the overflow: hidden property. Then plop your SEPARATE divs in there that masking div, one for each type of content: One for the blurry background, a separate div for text (so it stays crisp), and on mine, a separate div for a semi-transparent overlay. Use the Z-index to get things layered correctly. All these divs inside your masking div need to be absolute positioning. Oh, and you need to position your blurry background 50px beyond the mask on all sides—so that parts of it are hidden at the edges—so that you don’t get that blurry cut-off edge.
Here’s mine… it’s a messy work-in-progress, so it isn’t public or clone-able, yet, but you can see the effect in the blog post boxes:
That’s a lovely looking site so far @TylerDunlap ping me when it’s done! Excited to see the finished product. That’s a great utilization of the css blur effect for the background image.