-1

I need the page1, page2, and page3 links to be hidden behind the #site div. Right now they aren't. It has to be some z-index issue, no z-indexes I use work though.

So the #nav ul ul li should appear behind the #site div. Then when you hover over the "parent page" it will reveal those pages.

Here's a demo of the site: http://tempsmz.hostzi.com/

1
  • Are you about to create a drop down menu? Commented Aug 5, 2012 at 2:30

2 Answers 2

1

The z-index property only works with positioned elements (fixed, absolute and relative). Try adding a position: relative; to the elements and apply the desired z-index, like 1 for the nav and 2 for the site containers.

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you rdcmk, worked a treat. Can't believe I forgot that! What a dult I am tonight, been up all night. Anyway to fix the now caused issue?
What I'm trying to get is the parent pages to appear next to each other on the top of the page, like this: cl.ly/IWgu Then when a user hovers over a parent page with a submenu, it slides down to reveal the submenu/child pages - make sense?
It makes all sense. If you follow my instructions, or PeterVR's, since I gave the answer first, but he suggested the white background (don't know if it was needed, 'cause i tested without it and it worked), you can get it working.
0

To make the z-index work you should always add position: relative (or absolute or fixed). Also he div that you are covering the links with has actualy got a a transparent background. Try setting it to white and they should disappear like you want.

2 Comments

What do you mean? I got it working, can you look at the issue now?
you set all your positions to absolute now. Why did you do that? In the previous version you just had to add position: relative and background-color: #fff to the header div. I had it working in the chrome inspector before i posted my answer...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.