Robert Bamler: Geschachtelten Layer positionieren ??? Hilfe

Beitrag lesen

Hallo,

ich hab das Problem, das ich einen geschachtelten Layer (Layer2) der auf Layer1 liegt positionieren möchte.

Für Netscape 4:
parent.mainFrame.document.Layer1.left=positionx;
parent.mainFrame.document.Layer1.top=positiony;

Für IE4
parent.mainFrame.document.all.Layer1.style.left=positionx;
parent.mainFrame.document.all.Layer1.style.top=positiony;

Mit IE5
parent.mainFrame.document.getElementById("Layer1").style.left=positionx;
parent.mainFrame.document.getElementById("Layer1").style.top=positiony;

Wo ist da das Problem? Du musst statt "Layer1" jetzt halt "Layer2" schreiben. Beim IE4 und 5 würde ich allerdings an den Wert noch ein "px" anhängen.

<div id="Layer1" style="position:absolute; visibility:visible; left:405px; top:82px; width:451px; height:409px; z-index:5; background-color: #333300; layer-background-color: #333300; border: 1px none #000000">
  <div id="Layer2" style="position:absolute; visibility:visible; left:103px; top:107px; width:48px; height:50px; z-index:1; background-color: #FFFF00; layer-background-color: #FFFF00; border: 1px none #000000"></div>

^^^

Hinweis: da fehlt ein </div>

Robert

http://www.designauswahl.here.de
mit kostenlosem Webseiten-Generator ROBE.dit
[more than a HTMLE.dit]