You get a bonus - 1 coin for daily activity. Now you have 1 coin

How do I put a shadow on the sides of a div?

Practice



I need to put a shadow on the sides of a div, how do I do it? Here's an example:

How do I put a shadow on the sides of a div?

If you want it exactly like there, then:
1) Set style1 on the body: body {background:url("/images/ten.jpg") repeat-y scroll center 0 #ddf3fe}


2) Place the content in a block 1001px wide and give it the style margin:0 auto to centre it

Redy]If you want it exactly like there, then:
1) Set style1 on the body: body {background:url("/images/ten.jpg") repeat-y scroll center 0 #ddf3fe}


2) Place the content in a block 1001px wide and give it the style margin:0 auto to centre it

and here's the shadow image itself) nothing clever)))

CSS3 has ready-made properties for shadows
for example

-moz-box-shadow: 0 0 25px rgb(2, 2, 2);
-webkit-box-shadow: 0 0 25px rgb(2, 2, 2);
box-shadow: 0 0 25px rgb(2, 2, 2);

created: 2011-01-02
updated: 2026-03-09
411



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Scripting client side JavaScript, jqvery, BackBone"

Terms: Scripting client side JavaScript, jqvery, BackBone