Advanced Search Usage Terms Submit Contact
Dynamic Drive CSS Library
 
CSS Library
Submit an original CSS code
CSS Layouts
Web Graphics
Online Tools:

Advertise Here

CSS Library: DIVs and containers: Here

CSS Gradient Shadow

Author: Michael Burt

This is a CSS and JavaScript technique that lets you add a shadow to most elements on your page with a customizable shadow depth and coloring. Just give the element in question a class name of "shadow" to activate the effect.


The CSS:

The HTML:

Code Info

Rate this code:

Date Posted: 01/14/2007

Revision History: None

Usage Terms: Click here

Your Comments (62)

Got a question or need help customizing this CSS code? Post it in the CSS Forums. If you have a comment or suggestion instead, post it in the comments section below.

Comment Pages 4 of 7 pages « First  <  2 3 4 5 6 >  Last »

Everytime I visit this site I get something new to learn. It will help me in my all projects. Thanks..
Posted by Mandar on 12/18, 05:58 AM
i realy like the script but i want to know if you can change the direction of the shadow?
Posted by marvin on 01/25, 11:50 AM
Just what I needed! Many thanks!
Posted by hein on 02/14, 03:05 PM
That is awesome! it looks very great!
Posted by Forumistan on 03/13, 05:21 PM
Great tutorials. I just found it today.And will implement in my works.
Posted by Anju patel on 04/23, 10:30 PM
nice and helpful article
Posted by akshay on 05/03, 07:17 PM
This is very nice tutorial.

God live long you. Thank you very much!
Posted by Hitesh on 07/04, 04:18 AM
Very interesting and something worth playing around with
Posted by Flash Guy on 07/07, 11:45 PM
Great tutorial; however, using z-index in the style sheets can cause problems in some situations. To correct ths, delete the two z-index lines from the styles and replace this code:

document.body.appendChild(newSd)

with this code:

a[i].parentNode.insertBefore(newSd, a[i])
i++;
Posted by Preston Park on 07/17, 05:58 PM
Nice idea...
Another one for my list at http://www.kirkdesigns.co.uk/css-shadows-a-drop-shadow-roundup
Posted by Tom on 08/08, 07:34 PM

Comment Pages 4 of 7 pages « First  <  2 3 4 5 6 >  Last »

Commenting is not available in this weblog entry.
Copyright 2006-2011 Dynamic Drive Read our Usage Terms before using any of the CSS codes.