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

Drop down Menu hidden behind gallery plugin

I added a gallery plugin for a site I am working on, but it hides the drop down menu of the navigation. I have tried adding z-index: 9999; but I am having 0 luck. Any advice would be awesome.

Here is the website: http://twolittlefeetphotography.com/

Thanks

1 Answer

Hi Trent,

If you set the z-index of '#post-247' to 1, this will drop back behind your menu. You can then change your top menu back to 2. As long as it is 1 in front of the other it will work. :)

#post-247    { z-index:1; }
#topmenu    { z-index:2; }

Oh wow nice. Thanks for the help. that work like a charm. My only question now is if I add more photos will it effect the drop down menu?

No, they shouldn't. The key to using 'z-index' in this way is to set it on the 'parent' items. This means that anything inside 'post-247' will be behind anything in 'topmenu'. If 'post-247' is just one of many possible 'posts' then you may need to find a better container to set the z-index on, or maybe use 'article' if that suits.