11 February 2006

Build Web sites? Want to make easy drop shadows using CSS?

OK, so maybe I’m a little late to the CSS drop shadow game, but here’s a cool and relatively simple technique for “onion-skinned drop shadows.”

The CSS is a bit more complicated — but not much. There are basically three things that the style rules must accomplish for the shadow:

  • Make It Show. Assign each of the three shadow image components (shadow + two corners) to a different layer in the onion skin stack.
  • Make It Drop. Create an offset which moves the drop shadow down, and to the right of the object.
  • Make it shrink-to-fit. Force the divs surrounding the object to collapse upon it.
Link: Onion-Skinned Drop Shadows

Leave a Reply