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>


Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0