Inset box-shadow beneath content
You need to make a new element inside the div, with absolute positioning and height and width of 100%, then give that element the box shadow. div { height: 300px; color: red; position: relative; } div > div { box-shadow: inset 0 0 10px black; position: absolute; pointer-events: none; top: 0; left: 0; width: 100%; … Read more