Swapping layers in Netscape 7.1

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dobedani

    #1

    Swapping layers in Netscape 7.1

    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="visibili ty:visible;posi tion:relative; width:235px; z-index:0;
    display:inline; ">

    etc.

    </div>

    <div name="months" id="months"
    style="visibili ty:hidden; position:relati ve; 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:


    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
  • Michael Schmitt

    #2
    Re: Swapping layers in Netscape 7.1

    Hi Dobedani,

    Dobedani wrote:[color=blue]
    > 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:[/color]
    in your page the tables are in div elements.[color=blue]
    >
    > <td colspan="3" height="84" valign="top">
    > <div name="decades" id="decades"
    > style="visibili ty:visible;posi tion:relative; width:235px; z-index:0;[/color]
    ^^^^^^^^^[color=blue]
    > display:inline; ">
    >
    > etc.
    >
    > </div>
    >
    > <div name="months" id="months"
    > style="visibili ty:hidden; position:relati ve; z-index:-1;[/color]
    ^^^^^^^^^^[color=blue]
    > width:235px;
    > display:none;">
    > etc.[/color]
    [color=blue]
    > Kind regards,
    > Dobedani
    > Wageningen
    > the Netherlands[/color]

    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'

    Comment

    • Dobedani

      #3
      Re: Swapping layers in Netscape 7.1

      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


      Michael Schmitt <michas@wel.d e> wrote in message news:<cd1rkg$rf g$04$1@news.t-online.com>...[color=blue]
      > Hi Dobedani,
      >
      > Dobedani wrote:[/color]
      ....[color=blue]
      >
      > 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'[/color]

      Comment

      Working...