Announcement

Collapse
No announcement yet.

CSS: DIV-Footer via CSS platzieren

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSS: DIV-Footer via CSS platzieren

    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.

    HTML Code:
    <div class="content">
    <div class="contentright"></div>
    <div class="contentleft"></div>
    </div>
    
    <div class="footer"></div>
    HTML Code:
    .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.

  • #2
    bottom: 0px;

    entfernen
    Christian

    Comment


    • #3
      .content {
      background: ff0000;
      width: 756px;
      margin-left:300px;
      }

      .contentleft {
      background:00ffff;
      float: left;
      }

      .contentright {
      background:0000ff;
      }

      .footer {
      background:00ff00;
      margin-left:300px;
      width: 756px;
      height: 57px;

      }


      <html>
      <head>
      <title>TITLE TITLE</title>
      <link rel="stylesheet" href="d.css">

      </head>


      <body >

      <div class="content">Head
      <div class="contentleft">links</div>
      <div class="contentright">rechts</div>
      </div>

      <div class="footer"></div>
      </body></html>
      Christian

      Comment

      Working...
      X