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
7 Replies
thanks ❤️
how did i forget about the before 🤦♂️
Ah, vince used ::before
I did with box-shadow
i love css
amazing
with 1 line
why is "before" take up same space (width and height) with main div
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