Possible Duplicate:
Is it possible to graduate the opacity of an HTML element?
I am trying to get a div (and its border and contents) to fade into transparency (ie solid at the top and transparent at the bottom) using css.
Is there a way to do this?
Ive been able to fade the background out with the following:
.fade-to-nothing
{
background-image: -moz-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,1)), to(rgba(255,255,255,0)));
background-image: -webkit-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
background-image: -o-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
background-image: linear-gradient(to bottom, rgba(255,255,255,1),rgba(255,255,255,0));
background-repeat: repeat-x;
}
but haven't been able to find a way to do it to the content/border of the div as well. perhaps with some kind of nesting or an overlay?
EDIT heres what I was trying to do: