Dropshadows
Hmm… looks like maybe I should start a “How to do it with CSS”-section on this site. The other day I had a closer look at rounded corners, and today I’ve added my way of adding a dropshadow to a box. I wanted to keep the XHTML as simple as possible, so all I did was wrap the box in another div. A semi-transparent PNG image is used for the shadow in the browsers that can handle it. I’m using a child selector to hide that rule from IE/Win, and the commented backslash hack to hide it from IE5/Mac. The IE browsers are given a GIF image with every other pixel set to transparent, checkerboard style.
- Previous post: Rounded corners
- Next post: More dropshadows
Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.
Subscribe / follow
Sponsors
Authentic Jobs
- Android Mobile Developer at Quirky (New York City or San Francisco, Ca, US)
- Web Designer/Web Designer Senior at University of Michigan (Ann Arbor, Mi, Mi, US)
- Full-Stack Developer at Svensk Lånemarknad (Stockholm, Sweden, SE)
- Talented Web Designer, WordPress at e9digital (New York, NY, Ne, US)
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost

