Der gute, alte LAYER - absolute |
Die Befehl <absolute> bezieht sich auf die Positionierung innerhalb der SEITE und der Befehl <z-index> auf die Reihenfolge der Erscheinung im Bild. |
So sieht´s aus |
HTML Knowhow ist einfach spitze.
Hier ist eine absolut positionierte Box
Der gute, alte LAYER findet in der Box eine Wiedergeburt
![]() |
Quellcode |
<html>
<head> <style type="text/css"> #box1 {position: absolute; height: auto; width: 200px; left: 300px; top: 400px; background-color:red; color:white; padding:10px; z-index:4} #box2 {position: absolute; height: auto; width: 300px; left: 500px; top: 450px; background-color:green; color:black; padding:10px; z-index:2} #box3 {position: absolute; height: auto; width: 400px; left: 200px; top: 500px; background-color:fuchsia; color:yellow; padding:10px; z-index:3} #box4 {position: absolute; height: 300px; width: 300px; left: 400px; top: 380px; background-color:aqua; color:blue; padding:10px; z-index:1} </style> </head> <body > <div id="box1">HTML Knowhow ist einfach spitze.</div> <div id="box2">Hier ist eine absolut positionierte Box</div> <div id="box3">Der gute, alte LAYER findet in der Box eine Wiedergeburt</div> <div id="box4"><img style="height: 300px;width:300px" alt="" src="../Bilder/htmllogo.png"> </div> </body> </html> |
Kontakt Datenschutz Impressum |