ERLEDIGT
JA
JA
ANTWORTEN
2
2
ZUGRIFFE
588
588
EMPFEHLEN
-
Hallo!
Ich möchte gerne drei verschachtelte Div Container so formatieren, wie im Anhang dargestellt. Alle drei Container sind innerhalb eines Div-Tags (nötig für das Layout der Seite).
mein CSS sieht nun folgendermaßen aus:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#container1 { width:500px; height:300px; float:left; margin-bottom: 10px; margin-left: 40px; background-color: #093; margin-top: 10px; } #container2 { width:310px; height:500px; float:left; background:#000; margin-left: 40px; margin-bottom: 20px; margin-top: 10px; } #container3 { width:500px; height:200px; margin-left: 40px; background-color: #06F; float: left; clear: left; }
Problem ist nur, dass der 3. Container erst unterhalb des 2. Containers beginnt. Er sollte aber unterhalb des 1. Containers beginnen. Bitte um eine Lösung des Problems!
Danke
-
21.02.09 15:23 #2Maik Tutorials.de Gastzugang
Hi,
#container2 muß dann links umflossen werden:
Code :1 2 3 4 5 6 7 8 9
#container2 { width:310px; height:500px; [B]float:right;[/B] background:#000; margin-left: 40px; margin-bottom: 20px; margin-top: 10px; }
Falls du hier den IE6 berücksichtigst, empfehle ich dir, die drei Boxen zusätzlich mit display:inline auszuzeichnen, um seinem "Doubled-Float-Margin-Bug" entgegenzuwirken.
mfg Maik
-
1000dank, das ging ja schnell und hat funktioniert
Ähnliche Themen
-
Hintergrundfarbe in Container A an Höhe Container B anpassen.
Von Unique86 im Forum CSSAntworten: 4Letzter Beitrag: 18.08.08, 11:31 -
container (div) genauso hoch wie div im container
Von Razorhawk im Forum CSSAntworten: 4Letzter Beitrag: 21.02.08, 19:50 -
verschachtelte if-Anweisung
Von Bawla im Forum PHPAntworten: 5Letzter Beitrag: 18.01.08, 07:18 -
2 Div Container in 1 Div Container Problem
Von lacie im Forum CSSAntworten: 2Letzter Beitrag: 16.08.07, 23:13 -
verschachtelte WHILE-Schleifen
Von schlodd im Forum PHPAntworten: 3Letzter Beitrag: 27.07.04, 22:33





Zitieren
Login





