|
|||
Zwei Divs - eins größer als das andere
Hallo,
ich habe mit diesem Code ein Problem: (Anzusehen hier) 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" xml:lang="en" lang="en"> <head> <style type="text/css"> #files { margin-top: 75px; margin-left:15%; margin-right:15%; border:1px dashed; background-color:#FFFFE1; padding:20px; font-family: Tahoma, Helvetica; min-width: 70%; max-width: 70%; min-height:150px; } #console { margin-left:15%; margin-right:15%; margin-bottom: 75px; border:1px solid; background-color:#6495ED; padding: 5px; font-size:11px; font-family:Tahoma, Helvetica; width: 70%; min-height: 150px; } </style> <title>nickie12 :: console interface</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body style="margin:0; background-color:#ADD8E6;"> <div id="files">Test<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Test</div> <div style="min-height:100px; max-height:100px;"><br /> </div> <div id="console"> Test<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Test </div> </body> </html> Bereits versucht: min-width und max-width zu verwenden, width zu erhöhen (ging immer am Ziel vorbei) Getestet mit: Firefox, Safari, Opera |
Sponsored Links |
|
|||
Das ist kein Problem, sondern ganz normal.
Informier dich bitte über das Boxmodell. Die Breitenangaben sind überflüssig -- und damit verschwindet auch das Problem. Was soll das leere Element mit Inline-Styles? Wenn du einen Abstand zwischen zwei Elementen willst dann vergib margin. BTW: Stell deine CSS-Fragen doch bitte im entsprechenden Forenbereich. |
Sponsored Links |
|
|||
Danke, habe mir deine Aufzählung zu Herzen genommen und diesen Code daraus gemacht:
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" xml:lang="en" lang="en"> <head> <style type="text/css"> #files { margin-top: 75px; margin-left:15%; margin-right:15%; border:1px dashed; background-color:#FFFFE1; padding:20px; font-family: Tahoma, Helvetica; min-height:150px; } #console { margin-left: 15%; margin-right: 15%; margin-bottom: 75px; margin-top: 100px; border:1px solid; background-color:#6495ED; padding: 5px; font-size:11px; font-family:Tahoma, Helvetica; min-height: 150px; } </style> <title>nickie12 :: console interface</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body style="margin:0; background-color:#ADD8E6;"> <div id="files">Test<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Test</div> <div id="console"> Test<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Test </div> </body> </html> |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Div quer über 2 andere divs setzen... | unicorn | CSS | 23 | 11.05.2007 23:28 |
Kapitel-Verweis - erster Buchstabe größer, andere Farbe | Heart | CSS | 11 | 29.05.2005 21:28 |
Divs statt Tabellen (CSS) | S1!c3r | CSS | 2 | 20.05.2005 18:00 |
Div-Container mit variabler Höhe/an andere Divs ausrichtbar? | Tokuul | CSS | 7 | 10.01.2005 21:22 |
Browser-Problem bei Positionierung von DIVs | mickropixel | CSS | 3 | 20.09.2004 17:25 |