css problem

Hallo,
ich habe seit gestern leiter ein kleines css Problem.

Zunächst meine css datei:
[HTML]

  • {
    margin: 0;
    padding: 0;
    }

html, body {
font-family: Arial, Helvetica, sans-serif;
}

body,td,th {
font-family: Arial, Helvetica, sans-serif;
color: #000000;
font-size:12px;
}

body {
background-color: #ef0000;
background-image: url(_images/background.gif);
background-repeat: repeat;
background-position: center top;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}

.main {
background-image: url(_images/middle.png);
background-repeat: repeat-y;
width:948px;
margin: 0 auto;
padding-left:10px;
padding-right:10px;
height: 100%;
/height: auto !important;/
/position:relative;/

}

.header {
width:968px;
margin: 0 auto;
height: 215px;
background-image: url(_images/header.png);
background-repeat:no-repeat;
}

.footer {
width:968px;
margin: 0 auto;
height: 170px;
font-weight:bold;
text-align:center;
background-image: url(_images/footer.png);
background-repeat:no-repeat;
}

.empty {
width:580px;
margin: 0 auto;
min-height: 968px;
padding-left:0px;
text-align:left;
/left: 400px;/
}

.box1 {
width:200px;
padding-left:20px;
top:0px;
float:left;
}

.infobox {
width:200px;
}
.loginbox {
width:200px;
}
[/HTML]

Also mein Problem ist folgendes:
Die divs box1 und empty müssen nebeinanderliegen. Doch in diesem Zustand ist nur die box1 an der richtigen position und empty legt sich über die box1 aber auch nicht komplett.

Ich hoffe diese Informationen reichen auch und ihr könnt mir weiterhelfen.

Ich bin leider ein css neuling und freue mich über alle Vorschläge zur Verbesserung meiner Datei.

Grüße

Eine kleine Information habe ich vergessen:
im div: main wird das div box1 und div empty angelegt und befüllt.

Du darfst dann .empty nicht zentrieren.
Versuchs mal so:

.empty { width:580px; margin-left: 220px; min-height: 968px; padding-left:0px; text-align:left; }

Ggf. den margin-left-Wert noch anpassen.

Vielen Vielen dank das wars :slight_smile: