CSSgallery.info

Image crop tool
02 2008

css shadows - images and boxes


As we said in a previous post, we’ll try to bring here some resources related to css shadows applied to images or boxes.

CSS shadow kerfuffle

theshapeofdays

“… in addition to just the plain old img element, an enclosing div plus four additional divs to handle the corners”.

CSS Drop Shadows

CSS Drop Shadows

This technique uses an outer div for images, or 2 for text. For text basically is building a box around text, then is treated as block element - like image.

Drop shadow CSS

Drop shadow CSS

The author of this one, make uses of 3 overlapped boxes, with different backgrounds.It has Two methods, one pure css, one using images.

Also it provides a solution for text-shadow.

yDSF - Robust CSS Drop Shadows

yDSF - Robust CSS Drop Shadows

from the site: “yDSF is comprised of some lightweight structural (non-semantic) XHTML markup and a few CSS classes.”

CSS Drop Shadow Tests

CSS Drop Shadow Tests

Here is presented a way to allow multiple block level elements under same dropshadow box. It separate the border and the shadow in 2 separate wrappers, and use position:relative.

Flexible drop shadowed boxes using CSS

flexible drop shadowed boxes using CSS

This one uses 2 divs, the holder, with background set to shadow image(gif or png), and a wrapper div, inside the holder, positioned relative, with some negative margins.

Those above are pure css techniques. In a following post, we’ll try to add some resources that use javascript for this.

Update

Cssnewbie - 5 CSSriffic Treatments to Make Your Images Stand Out

added in comment#2 his technique.

Cssnewbie

TheĀ  markup get another wrapping div, and can be used with css border or a png image for browsers that allows alpha channel.


4 Responses to “css shadows - images and boxes”

  1. wow…this is great and useful for every one. Thanks for sharing it!

  2. I posted different way of making CSS drop shadows on Monday, in a post titled 5 CSSriffic Treatments to Make Your Images Stand Out. It’s similar to the method used in the A List Apart article (one extra div), except my method makes it a little easier to vary the size/depth of your shadow on the fly.

    I’d be honored if you’d check it out!

  3. @Cssnewbie …looks pretty nice, i added this to resources. Thank you for your submission.

  4. Thanks for the add. :)

Leave a Reply

« css shadows - text javascript drop shadows »