Swapping layers in Netscape 7.1

D

Dobedani

Dear All,

I have 2 layers which I want to show alternatively, depending on 2
radio buttons with the name "interval". The 2 layers are defined in a
table:

<td colspan="3" height="84" valign="top">
<div name="decades" id="decades"
style="visibility:visible;position:relative; width:235px; z-index:0;
display:inline;">

etc.

</div>

<div name="months" id="months"
style="visibility:hidden; position:relative; z-index:-1;
width:235px;
display:none;">

etc.

</div>
</td>

I developed some Javascript in addition to the HTML in order to make
the layers swap; the result can be found at:
http://home.wanadoo.nl/dobedani/swaplayers.htm

The code was developed for IE first and works in IE and also in Opera.
I could not avoid using the display property (none / inline) because
otherwise the layers don't overlap. However, it does not work in
Netscape 7.1; I must say I usu. avoid using layers because of this
kind of problems, but I can't here. What am I doing wrong here? Who
can help me please? TIA

Kind regards,
Dobedani
Wageningen
the Netherlands
 
M

Michael Schmitt

Hi Dobedani,
Dear All,

I have 2 layers which I want to show alternatively, depending on 2
radio buttons with the name "interval". The 2 layers are defined in a
table:
in your page the tables are in div elements.
<td colspan="3" height="84" valign="top">
<div name="decades" id="decades"
style="visibility:visible;position:relative; width:235px; z-index:0; ^^^^^^^^^
display:inline;">

etc.

</div>

<div name="months" id="months"
style="visibility:hidden; position:relative; z-index:-1; ^^^^^^^^^^

Kind regards,
Dobedani
Wageningen
the Netherlands

Leave away the z-index, because you don't need it if you use 'visibility' and
everything will work in IE 6.0 Sp1 and Mozilla 1.7. Maybe a negative 'z-index'
is moving your div-element behind the body.

cu, Michael
'good old Europe'
 
D

Dobedani

Dear Michael,

Thanks a lot! I have learnt something about layers! You are right that
a negative z-index is causing the layer to disappear in Netscape. Now
I know that the swapping works in IE, Opera and Netscape.

Concerning 'good old Europe': the code will soon appear in a web
application I am developing for an institute of the EU. E-mail me if
you wnat to know more.

Kind regards,
Dobedani
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,809
Latest member
moe77

Latest Threads

Top