Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Layout Basics Positioning Page Content Fixed Positioning

Akhter Rasool
Akhter Rasool
8,597 Points

contents behind the container having fixed position remains hidden, and present behind the container.

List Item "Icecream" disappears and is behind the ".name" class (position:fixed') when i do this in mobile view.

1 Answer

Adrian Patrascu
Adrian Patrascu
15,279 Points

Hi Akhter,

You will probably need to use the z-index property that Guil was going to present in the next video. Also be sure that you target the mobile view as well as from what I can see in the video the min-width that is targeted is 769px, which is larger than a usual mobile device. Also I do not believe it is best practice to keep fixed that menu on the mobile device as it will take much of the screen that is already limited compared to a desktop.

z-index W3 schools documentation: http://www.w3schools.com/cssref/pr_pos_z-index.asp

Thank you, Adrian