< >

footer-immer-unten-ohne-flex-und-javascript.php


Quell Code


<!DOCTYPE html>
<html lang="de">
<head>
<title>footer</title>
<style>

*{
 margin:0;
 padding:0;
 list-style:none;
}
 
html,body{
 height:100%;
 background:#123456;
}
 
 
body:before {
 content:"";
 height:calc(100% - 12px);
 margin-bottom:-100px;
 float:left ;
 display:inline-block; 
}

header{
 background:blue;
 height:100px;
  border:2px solid white;
}  

main{
 overflow:hidden;
 background:blue;
 height:30%;
 border:2px solid white;
}
 
footer {
 clear:both;
  height:100px;
 background:blue;
 border:2px solid white;
} 

</style>
</head>

<body>
<header><h1>Footer immer unten mit der Pseudoklasse :before</h1></header>
<main> <h2>Platz für weitere Spalten ( Menü und Inhalt )</h2></main>
<footer></h4>Footer</h4></footer> 
</body>

</html>

Add Comment

* Required information
1000
Powered by Commentics

Comments (1)

Gravatar
Admin
Sascha65says...

Die Canvas Balken Uhr ist ja mal Fett