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

The great tool ever i seen
Posted by Shaon on 06/05, 01:22 PM
Somebody please tell me how to change the place of the shadow. Thanks
Posted by Deepti on 06/15, 04:45 AM
I applied this code to a table and it works great in IE7. When I use firefox 2 the table gets all jumbled up. Is there any fix for this?
Posted by matt on 06/22, 09:22 PM
sorry,but it does not work in firefox
Posted by linda on 07/11, 12:31 AM
I copied the script exactly and in Safari the shadow kept coming on the top left and in firefox it came in the right spot.

But on the sample page provided the shadow was in the right spot in safari.
HELP!
Posted by Naomie on 07/12, 11:10 AM
I like the code, but I'm having trouble getting it to show up in IE. The sample page on dynamicdrive.com shows it correctly, so I'm sure it's just how Ipm positioning the code. I copied and pasted the CSS into my head section. It works in Firefox, but not IE. please help!
Posted by Mike on 08/07, 12:05 PM
Java "creep"??
I left this page open for maybe an hour while I poked about doing other things.
When I came back - the "shadow" boxes had creeped an inch to the LEFT and another 1/4" down - making HUGE colored boxes on the screen

??

FF 2.0.0.6 here. Switching the rendering engine to IE changed the "shadows" to SOLID red and blue boxes!
Posted by Don V on 09/12, 11:18 PM
super!love it!
Posted by Seema Johnson on 09/29, 11:20 PM
Nice.. put more plssss
Posted by Inan on 10/29, 02:02 AM
i need code of create 3 level menu in javascript. if your can able to send me code. i shall always be greatful to you ?
Thanks and best regards.
Diwakar Tiwari.
Posted by Diwakar Tiwari on 11/06, 02:00 AM

Comment Pages 3 of 5 pages « First  <  1 2 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