|
|||
Problem mit float right
hallo, ich verstehe nicht, warum sich die rechte Box (die gefloatet ist) nicht auf der Höhe der linken (gelben) Box (inline) ansiedelt, sondern den Abstand der Höhe der linken Box hält... (bin Beginner)
Nochmal in andern Worten: Die rechte und linke Box sollen auf einer Höhe stehen unter der breiten (roten) Box. Vielen Dank für Hinweise Der Code: DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="generator" content="Adobe GoLive" /> <title>Unbenannte Seite</title> <style type="text/css" media="screen"> body { margin: 0; padding: 0; font: 85% arial, hevetica, sans-serif; text-align: center; color: #505367; background-color: #000; } #container { margin: 5px auto; width: 762px; text-align: left; background-color: lime; border: 1px solid #fff; } #header { height: 149px; background-color: red; } #menue { height: 30px; background-color: #597845; } #content { float: right; width: 400px; height: 200px; background-color: blue; } #sublink { margin-right: 510px; margin-left: 20px; height: 200px; width: 200px; background-color: yellow; } #footer { clear: both; height: 20px; background-color: #154789; } </style> </head> <body> <div id="container"> <div id="header"> <div id="menue"></div> </div> <div id="sublink"></div> <div id="content"></div> <div id="footer"></div> </div> </body> </html> |
Sponsored Links |
|
|||
In Deinem Quelltext kommt zuerst #sublink mit
margin-right: 510px; margin-left: 20px; width: 200px; = zusammen eine Breite von 730px. Da der #container nur 762px Breite hat, passt #content mit einer Breite von 400px einfach nicht mehr in die Zeile. Gruß Chattanooga |
Sponsored Links |
|
|||
@ Chattanooga
danke erst mal. Das sehe ich ein. Aber wenn ich jetzt hingehe und z.B. margin-right: 510px & margin-left: 20px entferne, die linke Box also nur noch 200px breit ist, rutscht die rechte Box trotzdem nicht hoch??? |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
CSS von Plugin beisst! | expand | CSS | 0 | 28.09.2012 18:44 |
Problem mit Float bei divs | annon1879 | CSS | 3 | 02.03.2012 19:59 |
Problem mit Positionierung | Synoxis | CSS | 1 | 23.04.2007 11:49 |
float / clear - Problem | Thies | CSS | 2 | 03.11.2005 18:51 |
Inhalt von float: right wird in Firefox unten angerechnet | Sukkulent | CSS | 5 | 16.09.2005 23:43 |