Click to See Complete Forum and Search --> : shadows in css


po3
07-24-2007, 09:16 AM
I want to create a drop shadow around my #container div. That is the div in my example that creates the centered content area. How could I create a small drop shadow around it? Is it even possible with the patterned background.

Also what is causing the approx 10px space at the top of the page? I'm looking at this in safari and firefox on the mac if that makes any difference.

Take a look at the sample page here (http://projecto3.com/clients/test/index_test.html)

sticks464
07-24-2007, 09:52 AM
A good tutorial here http://web-graphics.com/mtarchive/001589.php
Add
*{margin:0; padding:0;} to your style sheet to remove any default margins and padding from the browsers.

po3
07-24-2007, 12:14 PM
can I apply this technique to my "container" div? I have the div center my content on the page so if I have to mess with margins isn't that going to effect my centering of the design?

this is the eement I want to have the shadow:
#container {
width: 85%;
background: #FFF;
margin: 0 auto;
text-align: left;
border: 1px solid #acc2cd;
}

ray326
07-24-2007, 12:22 PM
There are a couple of good articles on shadows at http://alistapart.com.