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 (47)

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 5 of 5 pages « First  <  3 4 5

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
If I make a two columns liquid layout with the left column being static, always in view. Then can I add a shadow with this technique to the left column? If not how can I do it?
Posted by Totally new at CSS on 09/12, 10:55 PM
excellent work !! it really gives a nice effect..thanks
Posted by sagar on 09/21, 09:45 PM
very cool!
Posted by thai on 10/14, 02:27 AM
I must be slow. 'Cut and pasted on test pages. 'Got the image and paragraph but no drop shadow. Shouldn't there be a link tag to give path information from the html to the css stylesheet?
Posted by cesare on 10/18, 08:57 PM
this is very good sameple code that i can use at my site http://www.cambodia-tourism.org

thanks
Posted by thanks you on 10/28, 12:48 AM
Really love this! Thank you so much!! Works in great in most browsers. Only I've been testing it (among other things) in IE8. It doesn't work in IE8, it does when you change the browser mode to IE7 or to IE8 Compatibilty View. I don't know JavaScript so I can't offer a solution. Just hoping someone else will.
Posted by Dilie on 11/17, 04:03 PM

Comment Pages 5 of 5 pages « First  <  3 4 5

Name: (Required)

Email: (Required)

(NOT shown on page)

URL:

(Shown on page if entered)

Comments: (Required)

Supported BB codes: [b], [i], [u], [em], [strike], [strong], [pre], [code], and [blockquote].

Remember my personal information
Notify me of follow-up comments?

Submit the word you see below ("previewing" post does not require it):


Copyright 2006-2008 Dynamic Drive Read our Usage Terms before using any of the CSS codes.
Dynamic Drive DHTML and CSS Code Library