I’m using Stellar.js to create a parallax background. Within that div that that contains the backgound, I’ve got another div that contains some content. This content should be centered horizonatlly and vertically, but I can seem to get that to work.
I’m finding that my content is centered horizontally, but is top aligned. Further more it’s actually pushing down the parallax background creating white space above the background.
I’m sure there is something basic that I’m doing wrong.
If I remove the heights, then your solution works.
The problem is that without the heights then the container parallax1 .parallax is only the size of the content. I need it to be much larger than that (in height).
The only other way I could think about doing it is adding a massive padding to the parallax-content, which doesn’t seems like a good solution.
Is there another way to control the height of the background?
I did want a height of 400px. I removed that earlier because I couldn’t get the centering to work. In the end I think it was margin and padding on p element in the style sheet. I moved the typography styles up in the sheet before uploading the test page.