Solved

Shadow/image around div or table

Posted on 2008-06-12
6
845 Views
Last Modified: 2013-12-25
Very simple question that I cannot find the answer too.  I have a table or div on a site and I want to add like a drop shadow/image around the border of that div or table.  

How can I achieve this, either through CSS or HTML.

Check this site out for a good example:
http://www.infusystem.com
0
Comment
Question by:LZ1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 10

Accepted Solution

by:
bluefezteam earned 250 total points
ID: 21773707
If you are using a table, this will be quicker to explain.
create a 3 by 3 table

the outer edge cells will hold your shading - the centre cell is for your content.

In photoshop(or similar) create a drop shadow effect which is 10px deep: start with a white square and apply the drop shadow effect, then you need to slice up the shadow into corners and sides. you should end up with corner pieces 10px x 10px and a side and top piece which is 10px x 1px.

With the 4 corners of the shadow you simply drop them into the corner table cells, and give the cells a height and width of 10px; for the sides and top you need to set those images as the BG image for those cells so they will repeat as the table gets longer.

Hope that makes sense.

Heres another tutorial

http://forums.digitalpoint.com/showthread.php?t=374316
0
 
LVL 10

Expert Comment

by:bluefezteam
ID: 21773716
0
 
LVL 30

Author Comment

by:LZ1
ID: 21774796
The tutorials you provided were ok, but what about making it scalable?  I don't want to have to do it each time I create  a new web page.  
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Assisted Solution

by:Devario Johnson
Devario Johnson earned 250 total points
ID: 21775949
have a 1px X 1 px image that is your bg but have it repeat X or Y based on if it's the sides or the top / bottom....

then use images for the corners that are similar to the 1 X 1 px ones...it will create the illusion of a image all around (shadow) and it will be scalable based on any dimension.
0
 
LVL 10

Expert Comment

by:bluefezteam
ID: 21776659
The solution is scalable - with the sides and top set as BG images, when you stretch the table in either direction, the table will grow and the BG images repeat

It will be scalable
0
 
LVL 30

Author Comment

by:LZ1
ID: 21778056
Thanks guys, I got it.  Works like a charm!!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this tutorial viewers will learn a few layer organization tricks and tips to improve their workflow in Photoshop. Open a multi-layer document in Photoshop: View all your layers by going Window > Layers:  To make sure your layers can be identified…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question