-2

.row {
  height: 300px;
  width: 300px;
  margin: 0 auto;
  box-shadow: 0 -20px 0px 0px white, 0 20px 0px 0px white, 12px 0 30px -4px rgba(0, 0, 0, 0.3), -12px 0 30px -4px rgba(0, 0, 0, 0.3);
}
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>

.row {
height: 300px;
width: 300px;
margin: 0 auto;
box-shadow: -8px 0 8px -8px black, 10px -1px 8px -8px black;
}
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>

So I have taken a good look regarding this topic: How to get box-shadow on left & right sides only

And the solutions are great. The only problem I have is that this particular site i'm working on has different rows. This causes the box-shadow to be in consistent. Is there anyway to fix this?

I will put up some images as reference.

Hope you guys are able to help me!

First solution: https://i.stack.imgur.com/jzyVk.png

Second solution: https://i.stack.imgur.com/DLx5p.png

1 Answers1

0

You might want to wrap your elements in a single <div> and then apply your desired effect to it.

But as mentioned in the comments you might want to add a bit of your code in your question.

Martin
  • 552
  • 4
  • 16