DIV-Footer via CSS platzieren

DIV-Footer via CSS platzieren

Beitragvon Marsl » 18.07.2011, 09:39

Hallo,

ich benötige Hilfe beim Erstellen eines Footers via CSS. Das DIV-Element "contentleft" soll den Inhalt der Seite darstellen, "contentright" das Menü. Die Höhe kann je nach Inhalt unterschiedlich sein, das funktioniert soweit auch. Wie bekomme ich es nun hin, dass der Footer direkt an das DIV-Element "content" andockt? "footer" soll immer direkt nahtlos unter "content" sein. Bin um jede Hilfe dankbar.

Code: Alles auswählen
<div class="content">
<div class="contentright"></div>
<div class="contentleft"></div>
</div>

<div class="footer"></div>


Code: Alles auswählen
.content {
      background: url(images/img03.jpg) repeat-y center;
      position: absolute;
      width: 756px;
      height: auto;
      left: 50%;
      margin-top: 112px;
      margin-left: -378px;
}

.contentleft {
      width: 425px;
      text-align: justify;
      padding-left: 20px;
      padding-right: 20px;
}

.contentright {
      float: right;
      width: 250px;
      text-align: justify;
      padding-left: 20px;
      padding-right: 20px;
}

.footer {
      background: url(images/img04.jpg) no-repeat center;
      position: absolute;
      width: 756px;
      height: 57px;
      left: 50%;
      margin-left: -378px;
      bottom: 0px;
}


Freundliche Grüße.
Marsl
neu hier
 
Beiträge: 1
Registriert: 18.07.2011, 09:36

Re: DIV-Footer via CSS platzieren

Beitragvon sejuma » 18.07.2011, 10:26

http://www.ohne-css.gehts-gar.net/0044.php
Für die horizontale Zentrierung verzichte auf absolute Positionierung und mach es besser so:
http://www.ohne-css.gehts-gar.net/0001.php
Bild
sejuma
Vielposter
 
Beiträge: 805
Registriert: 15.07.2009, 17:46


Moderatoren: Laus, Moderatoren

Ähnliche Beiträge zu "DIV-Footer via CSS platzieren"

Zurück zu: CSS für Fortgeschrittene

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste