6 replies [Last post]
Robbeh
Offline
newbie
Last seen: 16 years 29 weeks ago
Joined: 2003-05-16
Posts: 4
Points: 0

Hi,

I've got a javascript drop down menu. This drop down menu creates DIVs that contain the menu options.

The menu runs along the top of the screen.

The problem is, that under this menu is another frame and the DIVs that are made by the menu get lost underneath this other frame.

Does anyone know a way to make the DIVs from the top frame menu appear above the second, lower, frame?

I'd be really, really, greatful for any help.

Rob

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 3 days 2 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

z-index

Hi Robbeh,
Try using z-index.
give the menu a higher z-index then the other divs.
z-index:3;

Robbeh
Offline
newbie
Last seen: 16 years 29 weeks ago
Joined: 2003-05-16
Posts: 4
Points: 0

CSS Problems with DIVs

Hi,

Thanks for the suggestion, I've tried this one without any luck!

It's really got my stumped!

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 3 days 2 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

CSS Problems with DIVs

Hi Robbeh,
Can you link to an example page so we can have a look.

Robbeh
Offline
newbie
Last seen: 16 years 29 weeks ago
Joined: 2003-05-16
Posts: 4
Points: 0

CSS Problems with DIVs

Sure thing;
If you go to: http://www.esd.org.uk/TreeViewsIndex.htm
and then try and use the menu, you'll see what I mean.
I'm not sure there's any way around it.

d3signmonk3y
d3signmonk3y's picture
Offline
Enthusiast
Toledo, Ohio
Last seen: 16 years 19 weeks ago
Toledo, Ohio
Timezone: GMT-4
Joined: 2003-07-29
Posts: 59
Points: 0

CSS Problems with DIVs

Make sure you are applying the z-index to the container around the menus. I ran into this issue on the site I'm currently working on, and if I remember correctly, the conclusion I came to is that if you apply the z-index to the menu and it lives inside a relative or absolute positioned container it only puts it in front of the rest of the content in that container, not items outside of the container. If you apply a z-index to the container, it fixes the problem.

Hmmm... nevermind. I just looked at your link and you're using frames. Content from one frame can't appear over top of another frame.

Robbeh
Offline
newbie
Last seen: 16 years 29 weeks ago
Joined: 2003-05-16
Posts: 4
Points: 0

CSS Problems with DIVs

d3signmonk3y wrote:
I just looked at your link and you're using frames. Content from one frame can't appear over top of another frame.

I did actually manage to get around it.
I've put an IFrame underneath the menu, and then in that IFrame, I've put the other frameset.

An IFrame will always come below it's parent in the stacking order, so while the frames in the IFrame will come at the top of the Iframe's stack order, it'll never over run to the parent.

W00t Smile