Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How can I get a very "blurred" box-shadow out of only the bottom of the box?

How can I get a very "blurred" box-shadow out of only the bottom of the box?

Problem

My goal is to do this with pure css.

I am trying to make my box shadow with a very big shadow blur like this:

box-shadow: 0 0px 200px -2px #888;

Below the box, it looks awesome, but above now it's darkening the entire page. How can I make a super big blur without this darkening?

Problem courtesy of: user2058041

Solution

The best way to go about this might be, to use css-gradients instead of shadows.

I have done a little demo on jsfiddle. I am not sure this is what you are looking for though. Here is the css I used:

background: rgb(254,255,255); /* Old browsers */
background: -moz-linear-gradient(top,  rgba(254,255,255,1) 69%, rgba(226,226,226,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(69%,rgba(254,255,255,1)), color-stop(100%,rgba(226,226,226,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  rgba(254,255,255,1) 69%,rgba(226,226,226,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  rgba(254,255,255,1) 69%,rgba(226,226,226,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  rgba(254,255,255,1) 69%,rgba(226,226,226,1) 100%); /* IE10+ */
background: linear-gradient(to bottom,  rgba(254,255,255,1) 69%,rgba(226,226,226,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#feffff', endColorstr='#e2e2e2',GradientType=0 ); /* IE6-9

As generated by this tool

Solution courtesy of: decden

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

How can I get a very "blurred" box-shadow out of only the bottom of the box?

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×