Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Dan-Thomas Tveita
Dan-Thomas Tveita
107 Points

Chrome: z-index parallax issue

Im trying out a pure-css parallax like in this pen: http://codepen.io/dantveita/pen/BjQJQL

But when content is not scrolling, the z-index breaks in Chrome (not Safari).

To recreate the issue in the pen, just change the height of the image (as commented) til content no longer scrolls.

Any quick ways to solve this?

1 Answer

Tom Geraghty
Tom Geraghty
24,162 Points

What do you mean the z-index breaks? When I resize the height so there is no vertical scroll the image is overlayed on top of the other elements on the page.

The height value that has the comment next to it affects how much space is inserted between the paragraph text and the top of the page. What isn't working correctly?

NOTE: I tried this using Chrome