I am trying to make a parallax block with a background image and some text, but when the text is at the bottom of the div, it "overflows" it and appears outside of the image when you scroll too far.
The same happens with a semi opaque overlay I'm using to darken the background. Here's a screenshot:
I am trying to make a parallax block with a background image and some text, but when the text is at the bottom of the div, it "overflows" it and appears outside of the image when you scroll too far.
The same happens with a semi opaque overlay I'm using to darken the background. Here's a screenshot:
And here's my code:
CSS:
JS:
How can I have both elements inside the image while keeping the parallax effect?