Creating a linear transparent gradient to a div

JohnDel picture JohnDel · Oct 28, 2010 · Viewed 13.2k times · Source

I'd like to create a linear transparent gradient to a div. Is there any way to do that with jquery? Or should I use some other library like raphaeljs? I'd like to achieve an effect like the following:

alt text

Answer

Dustin Laine picture Dustin Laine · Nov 3, 2010

Why not keep it light and browser compatible.

div
{
    backgroud-image: url('images/gradient.png');
    background-repeat: repeat-x;
    background-position: top right;
}