HTML: Unterschied zwischen den Versionen

Aus Doku-Wiki
Zur Navigation springenZur Suche springen
Zeile 36: Zeile 36:
 
     </div>
 
     </div>
 
   
 
   
     <div id="footer">
+
     <div id="Footer">
 
         <p>Footer Content</p>
 
         <p>Footer Content</p>
 
     </div>
 
     </div>
Zeile 42: Zeile 42:
 
  </div>
 
  </div>
 
  </nowiki>
 
  </nowiki>
 
+
* CSS
 +
<nowiki>
 +
* {
 +
    margin: 0;
 +
    padding: 0;
 +
}
 +
 +
html, body {
 +
    height: 100%;
 +
}
 +
 +
#Page {
 +
    position: relative;
 +
    min-height: 100%;
 +
    width: 6000px;
 +
    margin: 0 auto;
 +
}
 +
 +
#Content {
 +
    background-color: orange;
 +
    padding-bottom: 80px;  || Abstand muss Footer Höhe entsprechen
 +
}
 +
 +
#Footer {
 +
    position:absolute;
 +
    bottom: 0;
 +
    width: 100%;
 +
    height: 80px;
 +
}
 +
 
[[Kategorie:Anwendungen]]
 
[[Kategorie:Anwendungen]]

Version vom 21. Oktober 2016, 08:04 Uhr

URL Weiterleitungen

<meta http-equiv="refresh" content="2;url=http://www.example.com/"> 

Page Refresh

<meta http-equiv="refresh" content="600">


HTML-Code Sonderzeichen

HTML-Seite

 <html>
   <head><title>Test</title></head>
   <body>
     <h1>Testseite</h1>
   <body>
 </html>
 

Text in HTML umwandeln

Sticky Footer - Fusszeile am unteren Rand

Mit diesem Beispiel kann man die Fusszeile einer Webseite an den unteren Rand setzen. Wenn die Webseite länger ist, wird die Fusszeile weiter nach unten verschoben, ansonsten bleibt sie am unteren Rand.

  • HTML
 <div id="Page">
 
    <div id="Content">
        <p>Content</p>
    </div>
 
    <div id="Footer">
        <p>Footer Content</p>
    </div>
  
 </div>
 
  • CSS
<nowiki>
* {
   margin: 0;
   padding: 0;
}

html, body {
   height: 100%;
}

#Page {
   position: relative;
   min-height: 100%;
   width: 6000px;
   margin: 0 auto;
}

#Content {
   background-color: orange;
   padding-bottom: 80px;  || Abstand muss Footer Höhe entsprechen
}

#Footer {
   position:absolute;
   bottom: 0;
   width: 100%;
   height: 80px;
}