Home html Block with inner shadow only at two edges

Block with inner shadow only at two edges





Such a task: to make a div with an inner shadow only at two edges: the top and bottom. In this case, there should be no shadows on the left and right.

Now I have done this like this : one div is 25px out of the window, the other prevents the body from stretching, hiding the rest of the first one.

Answer 1, authority 100%

You can do this:

box-shadow: inset 0 15px 15px -15px # 333, inset 0 -15px 15px -15px # 333;

The shadow will only be above and below. You can watch it here: http://jsfiddle.net/shpQ4/2/

Only tested in IE 10, but I think it works in all major browsers.

Answer 2, authority 18%

Online shadow generator CSS Box Shadow
helped a lot in due time.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions