How to make a layer behind my div?

i want to add this bluish layer behind the main div how? https://codepen.io/tataa31/pen/LYqeOqZ
tarek
CodePen
LYqeOqZ
...
No description
7 Replies
T
T12mo ago
thanks ❤️ how did i forget about the before 🤦‍♂️
missymae
missymae12mo ago
Ah, vince used ::before
missymae
missymae12mo ago
I did with box-shadow
No description
T
T12mo ago
i love css amazing with 1 line
Hamutcan
Hamutcan11mo ago
why is "before" take up same space (width and height) with main div
clevermissfox
clevermissfox11mo ago
Because it’s part of the same element, it’s just ::before or ::after the content inside it <div> ::before <p>I am some content </p> ::after </div> NOT ::before <div> <p>I am some content </p> </div> ::after
Want results from more Discord servers?
Add your server