09 March 2004

CSS Drop Shadows

A little while ago I was looking for a way to add CSS drop shadows to images. I wanted it for my gallery system - incogito. I started by playing with a background-image on the image, and adding a bit of bottom and right padding. This did not really work. I gave up for a little while due to having other projects I really should have been working on anyway.

Well, after a while I decided to get back to it. And in doing so found my way to this blog of Richard Rutter (Clagnut.com) which had the answer to my question. Via Clagnut I found my way to Dunstan's blog which also had a blog on the subject. I had been to Dunstan's before, and this technique just went to futher my good opinion of him and his site.

Anyway, on the very same day that I found Dunstans drop shadow technique an article was posted on A List Apart. This article was in a manner a follow up to Dunstan's, but with the added extra of being able to add drop shadows to block level elements, not just images. This was great for me, and I started playing.

It didn't take me long to realise that the ALA article used just a little bit to much code. And that it could be done easier.

Now, I draw your attention to my css drop shadow tests page which has an updated version of the ALA technique, and has incidentally gotten onto the CSS Vault - Thanks!

Yeah, the purpose of the blog was to direct you that page. Yes it was a bit long winded. But I am also one of those people that tell really long joked with bad endings. Go figure.

Comments ( 11 )

  1. Hasan

    IE5 box model

    I look forward to trying your tips out, thanks! You asked for an explanation of IE5's problems with margins. I thought it was a problem with borders and padding. Hope I'm not being insulting if I link you to Listamatic:
    http://css.maxdesign.com.au/listamatic/about-boxmodel.htm
    Cheers!
    13 March 2004 at 21:55
  2. Phil Baines

    I thought about the box model problem in problem with IE5.

    But the problem seems to be with vertical margins, not with padding or borders.

    I used to think that IE only had problems with padding and borders on the box model. Margins still outside the overall width.

    What seems to be happening, if I remember right, is that IE5 adds a 3px margin to the bottom of the innerbox. Why I dont know. I cant see how this is a box model thing, but I have used the escape hack in the same way to solve it.

    I just dont understand why it happens.

    p.s. I think I'm gonna have to fix that link. ;)
    14 March 2004 at 00:18
  3. Hasan

    Sorry 'bout the link, was it my fault or yours? Never mind, it looks much better! I'll see what I can find about that 3px gap. PS: Maybe a note saying whether HTML is allowed in these message posts?
    14 March 2004 at 17:02
  4. Hasan

    Oops, ignore that PS, I just scrolled down and there it was!
    14 March 2004 at 17:03
  5. Phil Baines

    Hasan, I only added it in last night, after you tried to code that link. So it's fine that you didn't notice.

    No need to 'opps'.
    15 March 2004 at 01:06
  6. Hasan

    Thanks, you're the man! re: the 3px gap, this might help, http://positioniseverything.net/explorer/threepxtest.html
    The IE Pixel Gap
    15 March 2004 at 16:20
  7. Hasan

    OK, why didn't that link work?
    15 March 2004 at 16:21
  8. Phil Baines

    I dont know! dammed Regular Expressions aren't kicking in for some reason.

    Im not very good on the old RegEx front, but it seems to only change them to links when there is a forced space before and after the URI.

    Hmmm. dammed regex. Gonna have to get my hands dirty and play with regex now.
    16 March 2004 at 09:44
  9. Phil Baines

    see its fixed now iv added those spaces in. strange.

    Anyway, thanks for the link. Even thought it taught be something new, I dont know if it is what is happening in this situation, because the 3px margin it being added to the bottom of the innerbox, as apposed to the sides of it, as in this example.

    When I get a bit more time, I will play around with it and see what I can do.
    16 March 2004 at 09:55
  10. Hasan

    Try setting line-height to zero?
    16 March 2004 at 15:55
  11. poker terms

    poker terms

    <h1> Please check the sites dedicated to<A HREF="http://www.teriandersonandassoc.com/play-texas-holdem.html"> play texas holdem </A> play texas holdem <A HREF="http://www.teriandersonandassoc.com/play-texas-holdem.html"> http://www.teriandersonandassoc.com/play-texas-holdem.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/caribbean-poker.html"> caribbean poker </A> caribbean poker <A HREF="http://www.teriandersonandassoc.com/caribbean-poker.html"> http://www.teriandersonandassoc.com/caribbean-poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/free-poker-game.html"> free poker game </A> free poker game <A HREF="http://www.teriandersonandassoc.com/free-poker-game.html"> http://www.teriandersonandassoc.com/free-poker-game.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/texas-holdem-software.html"> texas holdem software </A> texas holdem software <A HREF="http://www.teriandersonandassoc.com/texas-holdem-software.html"> http://www.teriandersonandassoc.com/texas-holdem-software.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/celebrity-poker.html"> celebrity poker </A> celebrity poker <A HREF="http://www.teriandersonandassoc.com/celebrity-poker.html"> http://www.teriandersonandassoc.com/celebrity-poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/free-online-poker.html"> free online poker </A> free online poker <A HREF="http://www.teriandersonandassoc.com/free-online-poker.html"> http://www.teriandersonandassoc.com/free-online-poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/strip-poker.html"> strip poker </A> strip poker <A HREF="http://www.teriandersonandassoc.com/strip-poker.html"> http://www.teriandersonandassoc.com/strip-poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/winning-poker-hands.html"> winning poker hands </A> winning poker hands <A HREF="http://www.teriandersonandassoc.com/winning-poker-hands.html"> http://www.teriandersonandassoc.com/winning-poker-hands.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/texas-hold-em-poker-game.html"> texas hold em poker game </A> texas hold em poker game <A HREF="http://www.teriandersonandassoc.com/texas-hold-em-poker-game.html"> http://www.teriandersonandassoc.com/texas-hold-em-poker-game.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/world-poker.html"> world poker </A> world poker <A HREF="http://www.teriandersonandassoc.com/world-poker.html"> http://www.teriandersonandassoc.com/world-poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/poker-players.html"> poker players </A> poker players <A HREF="http://www.teriandersonandassoc.com/poker-players.html"> http://www.teriandersonandassoc.com/poker-players.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/online-video-poker-game.html"> online video poker game </A> online video poker game <A HREF="http://www.teriandersonandassoc.com/online-video-poker-game.html"> http://www.teriandersonandassoc.com/online-video-poker-game.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/rules-for-texas-hold-em.html"> rules for texas hold em </A> rules for texas hold em <A HREF="http://www.teriandersonandassoc.com/rules-for-texas-hold-em.html"> http://www.teriandersonandassoc.com/rules-for-texas-hold-em.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/free-video-poker-game.html"> free video poker game </A> free video poker game <A HREF="http://www.teriandersonandassoc.com/free-video-poker-game.html"> http://www.teriandersonandassoc.com/free-video-poker-game.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/how-to-play-texas-hold-em.html"> how to play texas hold em </A> how to play texas hold em <A HREF="http://www.teriandersonandassoc.com/how-to-play-texas-hold-em.html"> http://www.teriandersonandassoc.com/how-to-play-texas-hold-em.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/hold-em-poker.html"> hold em poker </A> hold em poker <A HREF="http://www.teriandersonandassoc.com/hold-em-poker.html"> http://www.teriandersonandassoc.com/hold-em-poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/party-poker.html"> party poker </A> party poker <A HREF="http://www.teriandersonandassoc.com/party-poker.html"> http://www.teriandersonandassoc.com/party-poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/texas-holdem-online.html"> texas holdem online </A> texas holdem online <A HREF="http://www.teriandersonandassoc.com/texas-holdem-online.html"> http://www.teriandersonandassoc.com/texas-holdem-online.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/texas-holdem-tips.html"> texas holdem tips </A> texas holdem tips <A HREF="http://www.teriandersonandassoc.com/texas-holdem-tips.html"> http://www.teriandersonandassoc.com/texas-holdem-tips.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/stud-poker.html"> stud poker </A> stud poker <A HREF="http://www.teriandersonandassoc.com/stud-poker.html"> http://www.teriandersonandassoc.com/stud-poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/poker.html"> poker </A> poker <A HREF="http://www.teriandersonandassoc.com/poker.html"> http://www.teriandersonandassoc.com/poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/how-to-play-poker.html"> how to play poker </A> how to play poker <A HREF="http://www.teriandersonandassoc.com/how-to-play-poker.html"> http://www.teriandersonandassoc.com/how-to-play-poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/poker-terms.html"> poker terms </A> poker terms <A HREF="http://www.teriandersonandassoc.com/poker-terms.html"> http://www.teriandersonandassoc.com/poker-terms.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/online-video-poker.html"> online video poker </A> online video poker <A HREF="http://www.teriandersonandassoc.com/online-video-poker.html"> http://www.teriandersonandassoc.com/online-video-poker.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/texas-hold-em.html"> texas hold em </A> texas hold em <A HREF="http://www.teriandersonandassoc.com/texas-hold-em.html"> http://www.teriandersonandassoc.com/texas-hold-em.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/poker-rooms.html"> poker rooms </A> poker rooms <A HREF="http://www.teriandersonandassoc.com/poker-rooms.html"> http://www.teriandersonandassoc.com/poker-rooms.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/rules-for-texas-hold-em-card-game.html"> rules for texas hold em card game </A> rules for texas hold em card game <A HREF="http://www.teriandersonandassoc.com/rules-for-texas-hold-em-card-game.html"> http://www.teriandersonandassoc.com/rules-for-texas-hold-em-card-game.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/poker-hand.html"> poker hand </A> poker hand <A HREF="http://www.teriandersonandassoc.com/poker-hand.html"> http://www.teriandersonandassoc.com/poker-hand.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/poker-hands.html"> poker hands </A> poker hands <A HREF="http://www.teriandersonandassoc.com/poker-hands.html"> http://www.teriandersonandassoc.com/poker-hands.html</A> <br/> <A HREF="http://www.teriandersonandassoc.com/poker-site.html"> poker site </A> poker site <A HREF="http://www.teriandersonandassoc.com/poker-site.html"> http://www.teriandersonandassoc.com/poker-site.html</A> <br/> - Tons of interesdting stuff!!! </h1>
    19 May 2005 at 03:51

Sorry, commenting has been disabled for a while. I am getting a stupid amount of comment spam, and need to find a new way of doing things.

I will not publish your email address, but I may use it to get in contact with you.

HTML tags and entities display as source; they do not render. To create a live link, simply type the URL (including http://).

Topics

  • I am more than willing to admit the big gaps in my knowledge on many topics, including web development. This is a topic I use to get help from the community, and my imaginary audience.
    Ask the Audience
  • Even though looking pretty is not the most important layer to a succesful web site (I don't think there is a Most Important), it does help!
    Graphic Design
  • Have you got a sense of?
    Humor
  • The glam, the sadness, the joy, the madness.
    Life of Findel
  • What ever doesn't fit
    Misc
  • I have a crappy camera, but I do try. A good artist always blames his tools.
    Photography
  • Here I chat about projects I am working on, going to work on, or finished. Some of them I will be happy to let you in on, others I will be ashamed of.
    Project Watch
  • Site news and updates
    Site Info
  • Keepin' an eye on the wwwubb
    Watching The Web
  • This topic will be used for talking about all manner of project management issues relating to Wed Development (Wubb Development). Where we may talk about how to code in the Wubb Development topic, we will be more likely to talk about giving quotes, or planning projects, in this topic.
    Working with Wubbs
  • All things Web Development - Web standards, Hacks, Graphics, and more.
    Wubb Development