CSS Drop Shadows
A List Apart has a new article on how to make CSS Drop Shadows that work in IE. The first article shows how to do it for all the other browsers. I dig the technique, so I've decided to use it on this site. To add it, all I did was add the following to the <head> of this page:
<style type="text/css"> div.alpha-shadow { clear: both; float: left; background: url(http://www.alistapart.com/d/cssdrop2/img/shadow.gif) no-repeat bottom right; margin: 5px 0 0 10px; } div.alpha-shadow div { background: url(http://www.alistapart.com/d/cssdrop2/img/shadow2.png) no-repeat left top !important; background: url(http://www.alistapart.com/d/cssdrop2/img/shadow2.gif) no-repeat left top; float: left; padding: 0px 6px 6px 0px; } div.alpha-shadow img { background-color: #fff; border: 1px solid #a9a9a9; padding: 4px; margin: 0; } </style> <!--[if gte ie 5.5000]> <link rel="stylesheet" type="text/css" href="http://www.alistapart.com/articles/cssdrop2/ie.css" /> <![endif]-->
Then I wrapped the following image with:
<div class="alpha-shadow"> <div><img src="..." alt=""/></div> </div>
If I decide I like this, I'll make sure and download the images/stylesheets locally so not to hog bandwidth from alistapart.com. Too bad there's not a technique to make text drop-shadows work. To see what I mean, see my Struts Resume demo. All the <h1> tags (titles) should have a drop-shadow - and they do in Mozilla, Firefox and Safari (but no go in IE).
The real question is - how do I get it to NOT float:left, but still get the drop-shadows to work? I guess I'll have to ask that question on alistapart.com.
Hmmmmm, my version doesn't work in Safari, what's up with that?!
Posted by Lance on April 23, 2004 at 04:03 PM MDT #
Posted by Gabriel Mihalache on April 24, 2004 at 04:03 PM MDT #
Posted by Chris Custine on April 25, 2004 at 03:47 PM MDT #
Posted by Matt Raible on April 27, 2004 at 03:35 AM MDT #
Posted by Scott McClure on June 30, 2004 at 02:46 AM MDT #
Posted by Matt Raible on June 30, 2004 at 07:16 PM MDT #
Posted by prem ypi on February 21, 2009 at 06:00 PM MST #
Posted by prem ypi on February 21, 2009 at 06:01 PM MST #