Friday April 23, 2004
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?!
Search This Site
Recent Entries
- Secure JSON Services with Play Scala and SecureSocial
- My What's New in Spring 3.1 Presentation
- Twitter's Open Source Summit: Bootstrap 2.0 Edition
- Refreshing AppFuse's UI with Twitter Bootstrap
- 2011 - A Year in Review
- Upgrading AppFuse to Spring Security 3.1 and Spring 3.1
- What have I been working on at Taleo?
- Our Engaging Trip to Paris and Antwerp
- My HTML5 with Play Scala, CoffeeScript and Jade Presentation from Devoxx 2011
- Deploying Java and Play Framework Apps to the Cloud with James Ward
Posted by Lance on April 23, 2004 at 10:03 AM MDT #
Posted by Gabriel Mihalache on April 24, 2004 at 10:03 AM MDT #
Posted by Chris Custine on April 25, 2004 at 09:47 AM MDT #
Posted by Matt Raible on April 26, 2004 at 09:35 PM MDT #
Posted by Scott McClure on June 29, 2004 at 08:46 PM MDT #
Posted by Matt Raible on June 30, 2004 at 01:16 PM MDT #
Posted by prem ypi on February 21, 2009 at 12:00 PM MST #
Posted by prem ypi on February 21, 2009 at 12:01 PM MST #