/    Sign up×
Community /Pin to ProfileBookmark

Layers not obeying zIndex in IE

Hello!

I am asking for help here mostly because I am trying to obtain a very simple DHTML “menu” (just a few – 2 at the moment – links to other pages that I want to be contained by a layer that appears and disappers based on a onMouseOver).

However I am hitting my head against walls with a different problem. In short the layout is like this: a table centered with a single cell, in it a layer positioned relative and in it a wealth of -some- nested layers positioned absolute.

My problem is that they don’t obey the zIndex I gave them. The URL is:[URL=http://www.prezenta-web.com/temp/]http://www.prezenta-web.com/temp/[/URL] .

The main problem is a layer called ‘layerinvizibil’ that doesn’t want to come on top of ‘layer3’. I have tried to declare it with ‘visible’, to asign it in onLoad a zIndex of 7 (more than any other) but nothing.

What is the cause of this?

Thank you for your time!

Best regards!

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisAug 17.2004 — The DIV "layerascuns" is inside the DIV "meniu". I don't think you can promote a layer above its container.
Copy linkTweet thisAlerts:
@AndyB78authorAug 17.2004 — Thank you for your answer. I don't want to make 'layerascuns' visible over 'meniu' (it's container) but over 'rand3'. Also, this problem is mostly in IE (in Opera, NS ans Mozilla it looks ok to me).

Thank you!

Best regards,

Andrei Banu
Copy linkTweet thisAlerts:
@FangAug 18.2004 — Place "layerascuns" as the last element in the document (after the table).

Give it a z-index of -1.

On the mouse event give it a z-index of 4 or higher to bring it above "rand3".

The flash object will always be above any other element in the document (something you can not change).

A negative z-index is not valid in some browsers.

z-indices are normally set in the order of the elements in the document, but this is not always the case!

Error: document.getElementById('layerascuns')[COLOR=red].style[/COLOR].zIndex

Using the property [I]display[/I] (block and none) is easier to implement than [I]z-index[/I]
×

Success!

Help @AndyB78 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...