-
The Call of ChrismathuluR.J. LorimerFri, Nov 7 2008 @ 2:38 pm
-
Getting True Java Classes in JRubyR.J. LorimerThu, Sep 25 2008 @ 6:41 pm
-
JRuby 1.1.4 ReleasedR.J. LorimerFri, Aug 29 2008 @ 5:41 am
-
My XBoxR.J. LorimerMon, Aug 25 2008 @ 3:22 am
-
Why So Serious?R.J. LorimerSat, Aug 23 2008 @ 5:25 am
Shadow Boxes
Tue, 12/30/2003 - 08:00 — R.J. Lorimer
I've recieved more than one question regarding the 'shadow-boxes' used on items such as my comments view. It seems to be a popular look and feel item, so, I thought I'd post a little tutorial on implementing it in a quick n' dirty fashion.
To start, a basic box needs to be defined:
Which will look like this:<div style="border: 1px solid black; padding: 4px;">My Shadowed Box</div>
My Shadowed Box
Next, the easiest solution I have found to make it work cross-browser is to wrap the first div in a container, and offset the inner container from the parent:
Which will look like this:<div style="background-color: #999;"> <div style="border: 1px solid black; padding: 4px; top: -2px; left: -3px;">My Shadowed Box</div> </div>
My Shadowed Box
That is about it! Now you can style the inner-box all you want, and the outer box will fit accordingly.
