Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
z-index always on top? or +1?
Old 08-03-2010, 06:56 AM z-index always on top? or +1?
Novice Talker

Posts: 8
Trades: 0
Hi Everyone,

i have a question regarding the z-index of a DIV.

In the website below, I'm experimenting with show/hide layers to display a project, instead of navigating to another page.

At the moment, this works for two images, the 3rd on the top row, and the fourth on the middle row. (recognizable by the yellow border, not showing up, that's another problem....)

I want the seperate layers to be on top, when you click them.

I've added a change-property behaviour on both DIV's, that sets the z-index to 200 onClick. Of course, this only works once, because when switching between the layers several times, both of them are set to 200.

Any ideas?

http://www.mbarch.nl/test3/
Anja is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-03-2010, 07:12 AM Re: z-index always on top? or +1?
Novice Talker

Posts: 8
Trades: 0
Also, trying to change the z-index of the other layer to a lower value, doesn't seem to work.

Code:
<div id="Layer055" style="position:absolute;width:250px;height:290px;left:1000px;top:30%;visibility:hidden" 
onclick="MM_changeProp('Layer055','','zIndex','100','DIV' ; 'Layer068','','zIndex','99','DIV')">
and

Code:
<div id="Layer068" style="position:absolute;width:250px;height:290px;left:500px;top:35%;visibility:hidden" 
onclick="MM_changeProp('Layer068','','zIndex','100','DIV' ; 'Layer055','','zIndex','99','DIV')">
but that might be because of an error in the two onClick values?

Last edited by Anja; 08-03-2010 at 07:13 AM..
Anja is offline
Reply With Quote
View Public Profile
 
Old 08-03-2010, 07:14 AM Re: z-index always on top? or +1?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
just reset the z-index of the other elements in the collection at the same time in the function
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to z-index always on top? or +1?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21256 seconds with 12 queries