Forum Moderators: not2easy

Message Too Old, No Replies

Table Shadow?

         

tonynoriega

3:10 pm on Jan 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



can anyone show me how to get that cool shadow that makes a table look likes its floating?

i know its old school, but i would like to know.

gratzie.

Robin_reala

10:38 pm on Feb 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



table { box-shadow: 0.2em 0.2em #ccc; }

Well, that's the theory [w3.org] at least :) In practise only recent (newer than 1 month) Webkit builds support that so it’s probably about as far away from cross browser compatible as you’re going to get.

Luckily there’re plenty of other workarounds online if you look. If your element is a fixed size then you can encase it in a wrapper element, pad that in and apply a background image of the shadow to it. If not then it’s a little harder (although that mostly depends on whether you want fuzzy rounded corners or not). Let me know if you want a specific example and I’ll see what I can come up with.