# Create a Faded List Item Using CSS3

I know there are about 1000 tutorials on various styles that you can give your lists using CSS3 on the web…but I still wanted to add my own voice to the mix.

I wanted to create a CSS list that displayed the name of an item, and an associated value as a set of responses from my users. This is very simple without the styling. Here is my HTML.

As I said, a very simple, unordered list. For the purposes of this post, I will assume it is sitting on a background with a hex value of #424242, but you can place this list wherever you want and on whatever color background you want (that is outside the scope of this post, however). Adjust the colors accordingly.

Now that the list is in place, it’s time to do just a quick styling with CSS3. I’m going to show the code first, and then describe what’s happening.

Most of the CSS is fairly straightforward. The part I want to point out starts on line 10. This effect basically takes the box that holds my list item and fades it from one color (#FF7F27) to the background color (#424242) coming from the left side. Unfortunately, every browser supports a different way of doing this (what a pain), which is why you see five different versions of this gradient.

Other than that, I also give the border a radius for browsers that support it starting at line 17. In the next rule, I also remove the text decoration and set the font color on the link itself. The final, resulting look is:

I would recommend playing around with the percentage of the fade (adjust the 67% value after the color). Please note that the rest of the styling is not part of this tutorial.

Also, there is an option to use transparencies within the linear-gradients (at least some of them). I had a little bit of trouble with it, but in case you wish to investigate further, you need to use rgba colors like this:

Hope this helps you out! Check out ImpressiveWeb’s CSS3 linear gradients article for more information on the topic.