Linuchs: Bild wird nicht absolut positioniert

Beitrag lesen

Hallo,

irgendwie habe ich ein Brett vor dem Kopf, aber ich komme nicht drauf.

Für das Überblenden von Bildern möchte ich ein absolut positioniertes auf ein vorhandenes drauflegen. Parent beider Bilder ist eine relative td, das erste Bild soll die Höhe des td aufspannen, das zweite dann z-mässig drüberliegen.

Aber es liegt y-mässig drunter:

CSS:

table.tp590 {  
  width: 100%;  
  table-layout: fixed;  
  border-collapse: collapse;  
  margin-bottom: 0.5em;  
}  
table.tp590 tr td:nth-child(1) {  
  position: relative;  
}  
table.tp590 tr td:nth-child(1) img {  
  display: block;  
  width: 100%;  
}  
table.tp590 tr td:nth-child(1) img#bild_neu {  
  position: absolute;  
  z-index: 2;  
}  
table.tp590 tr td:nth-child(1) p {  
  position: absolute;  
  left: 10px;  
  bottom: 5px;  
  background-image: url( img/transp_weiss_40.png );  
  padding: 2px 5px 2px 5px;  
}

HTML:

<table class="tp590">  
  <tr>  
    <td>  
      <!--img src="fotos/steyr_panorama_winter_800_200.jpg" style="width:100%" alt=Steyr /-->  
      <img id=bild_alt src="http://remso.eu/img_orte/panorama_brunsbuettel_schleuse_800_200.jpg" alt="Brunsbüttel" />  
      <img id=bild_neu src="http://remso.eu/img_orte/brunsbuettel_kreuzfahrtschiff_J_Sievers_800_200.jpg" alt="Brunsbüttel" />  
      <p id=panorama_text>Brunsbüttel: Schleuse zwischen Elbe und Nordostseekanal (Wikipedia)</p>  
    </td>  
    <td></td>  

Warum wird die Angabe position:absolute ignoriert?

Linuchs