ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
4685
4685
EMPFEHLEN
-
11.05.08 04:25 #1Maik Tutorials.de Gastzugang
Wie richte ich eine Box am unteren Rand der Elternbox aus?
Die Ausgangssituation: In einer Box (hier mit einer Mindesthöhe von 300px) soll an ihrem unteren Elementrand eine Box positioniert werden, die an dieser Stelle als "Footer" fungiert und vom zunehmenden Inhalt in der Elternbox nach unten verrückt wird.
Markup:
Code :1 2 3 4 5 6 7 8 9
<div id="parentBox"> <h2>parentBox</h2> <!-- Hier folgt der weitere Inhalt der #parentBox --> <div id="childBox"> <p>childBox</p> </div> </div>
![[CSS] Wie richte ich eine Box am unteren Rand der Elternbox aus?-nested_box_at_bottom.jpg](http://www.tutorials.de/attachments/webmaster-faq/39401d1322821876t-nested_box_at_bottom.jpg)
Lösung:
Die Parent-Box wird relativ und die Child-Box in ihr absolut positioniert.
Stylesheet:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
div#parentBox { [b]position:relative;[/b] min-height:300px; height:auto !important; height:300px; width:550px; padding:10px; border:1px solid #000; } div#childBox { [b]position:absolute; left:0; bottom:0;[/b] height:50px; width:550px; padding:10px; background:#ccc; }
mfg Maik
Ähnliche Themen
-
Fixieren am unteren Rand
Von mike4004 im Forum CSSAntworten: 14Letzter Beitrag: 21.08.07, 23:11 -
Abstand vom unteren Rand
Von 's KATERchen im Forum CSSAntworten: 3Letzter Beitrag: 17.03.06, 17:48 -
div am unteren rand fixieren
Von casr im Forum Javascript & AjaxAntworten: 6Letzter Beitrag: 28.04.05, 13:58 -
flimmern am unteren rand
Von dado26 im Forum Videoschnitt, Videotechnik & -produktionAntworten: 3Letzter Beitrag: 15.02.05, 17:34 -
Brauche Hilfe, und eine Erklärung, wie man Text an den unteren Rand zwängt!
Von zg peripherals im Forum HTML & XHTMLAntworten: 5Letzter Beitrag: 26.05.02, 01:29





Login




