Need help in CSS Box Shadow
I just started on the website, so all I did was add a background color. But couldn't get the box shadow working...

What should I do?
Show message
Join up (it's free!) whether you're just starting out or you're crazy advanced. Get tips from people who know what they're talking about, without being treated like the playground smelly kid. Because seriously, your school classes didn't teach you anything you wanted to know.

Posted 05 April 2012 - 05:53 AM (#1)

Posted 05 April 2012 - 06:04 AM (#2)
box-shadowsyntax is correct. The problem is that you have no heights or widths set on the elements. Try adding
width: 100pxand
height: 100pxto the
.shadow. Also, have you defined an element with the
shadowclass? For example,
<div class="shadow"></div>.
Posted 05 April 2012 - 06:16 AM (#3)
body.shadow
body .shadow
body{
background-color:...;
box-shadow: ...;
}
/* or */
body{
background-color:...;
}
.shadow{
box-shadow: ...;
}
body .shadow{
/* your style*/
}.shadow{
/* your style*/
}
Posted 05 April 2012 - 09:37 AM (#4)
body{
background: #e0e0e0;
box-shadow:0 0 15px #000 inset;
}
.shadowapplied that is nested inside the body tags.
Posted 05 April 2012 - 10:07 AM (#6)
Hyde, on 05 April 2012 - 09:41 AM, said:
body .shadowdefinitely works.
Posted 05 April 2012 - 10:51 AM (#7)
Varemenos, on 05 April 2012 - 10:07 AM, said:
body.shadowand not just
.shadow? Less selectors is better.
Posted 05 April 2012 - 10:55 AM (#8)
arronhunt, on 05 April 2012 - 10:51 AM, said:
body.shadowand not just
.shadow? Less selectors is better.
Posted 05 April 2012 - 10:57 AM (#9)
arronhunt, on 05 April 2012 - 10:51 AM, said:
body.shadowand not just
.shadow? Less selectors is better.