Layout-Problem (2-spaltig)

Status
Nicht offen für weitere Antworten.

sipoh

Erfahrenes Mitglied
Hallo,

ich finde in meiner CSS einfach nicht den Fehler.

Code:
#header {
width: 900px;
height: 80px;
border: solid 1px;
margin: 0;
padding: 0;
background-color: #ffffff;
}

#content {
padding: 0;
margin: 0;
width: 700px;
height: 300px;
background-color: #cccccc;
}


#right {
float: right;
width: 200px;
height: 300px;
margin: 0;
padding: 0;
background-color: #cccccc;
}

#footer 	{ 
height: 80px;
width: 900px;
clear: both;
padding: 0;
margin: 0;
background-color: #cccccc;
}

#container {
width: 900px;
border: 0px;
margin: 0;
padding: 0;
}

Content und right stehen einfach nicht nebeneinander. Hat dazu jemand eine Idee?
 
Hi,

das kommt darauf an, in welcher Reihenfolge die DIVs #content und #right im HTML-Code notiert sind.

  1. #content
  2. #right
Code:
#content {
float:left;
padding: 0;
margin: 0;
width: 700px;
height: 300px;
background-color: #cccccc;
}

  1. #right
  2. #content
Code:
#content {
padding: 0;
margin: 0 200px 0 0 !important; /* moderne Browser */
margin: 0 197px 0 0; /* 3px-Gap-Bug im IE */
height: 300px;
background-color: #cccccc;
}

#right {
float: right;
width: 200px;
height: 300px;
margin: 0 0 0 0 !important; /* moderne Browser */
margin: 0 0 0 -3px; /* 3px-Gap-Bug im IE */
padding: 0;
background-color: #cccccc;
}
 
Status
Nicht offen für weitere Antworten.
Zurück