/* From http://www.positioniseverything.net/articles/dropshadows.html */ html>body .outerpair1 { background: url( upperrightfade.png ) right top no-repeat; } /* .outerpair1 must be given a width contraint, via either a width, or by floating or absolute positioning. In this demo these are applied from the second class name on the .outerpair1 DIV's. This box also has one of the corner .png's. */ html>body .outerpair2 { background: url( lowerleftfade.png ) left bottom no-repeat; padding-top: 8px; padding-left: 8px; } /* .outerpair2 has padding equal to the shadow thickness, and also has one of the corner .png's */ html>body .shadowbox { background: url( shadow.png ) bottom right; } /* .shadowbox holds the main shadow .png */ html>body .innerbox { position: relative; left: -8px; top: -8px; } /* .innerbox is made "relative" and is "pulled" up and to the left, by a distance equal to the thickness of the shadow. Because this is a relative-based shift, the box retains its exact dimensions without change. */ .shadowbox img { border: 0; vertical-align: bottom; } /* Shadowed images should not be made "block" for eliminating the baseline space under the images, because this may trigger IE background bugs. Instead, use "vertical-align: bottom;" for this purpose. */ /*XXXXXXXXXXXXXXXXXX Custom width constraints and extra styling XXXXXXXXXXXXXXX*/ .floatimage { float: left; /* Floating causes this box to shrinkwrap around sized content elements. */ margin: 130px 0 0 450px; display: inline; /* IE doubled margin bug is defeated via this fixer rule. */ } .flashbox { /* Absolute positioning also causes the shrinkwrap behavior. */ position: absolute; left: 377px; top: 30px; } .flashbox .innerbox { background: #eed; border: 1px solid #ccb; } .absoluteimage { /* Again, absolute positioning causes shrinkwrapping. */ position: absolute; left: 40px; top: 200px; } .textbox { position: absolute; /* AP once more... */ left: 20px; top: 1.8em; } .textbox .innerbox { border: 1px solid #ccc; background: #e8e8e8; width: 330px; height: 210px; overflow: auto; } /* Unlike the other items, the .textbox content is just text without a natural width, and so shrinkwrapping fails, unless .innerbox is given a specific width. All shadowed text elements will need a width of some kind to avoid a full-width shadowed box, unless that is the desired effect. The width may be appied to div.inner, div.outerpair1, or an external wrapper element. */ .linkbox { position: absolute; /* AP once more... */ left: 10px; top: 6px; } .linkbox .innerbox { display: block; background: #fff; border: 1px solid #ccc; padding: 3px 5px; }