<DOCTYPE! html>
<head>
<link rel="stylesheet" type="text/ccs" href="css/indexcss.css">
</head>
<body>
<div id="wrapper">
<div id="header">
<?php
include("utilbar.php");
include("navbar.php");
?>
</div>
<?php
if (isset($_GET["type"])) {
$page = $_GET["type"];
}
else {
$page = "home";
}
//echo "<body onload=\"changeContent('".$page."')\">";
?>
<!--script>
function contentOnload() {
window.location.href('content.php');
}
</script-->
<script>
function navClick(contentName)
{
window.location.href = "index.php?type=" + contentName;
}
</script>
<div class="container">
<?php include($page.".php"); ?>
</div>
<div class="footer">
<?php include("footer.html"); ?>
</div>
</div>
</body>
</html>
CSS hier:Sticky Footer mit php
html, body {
height: 100%;
margin: 0;
padding: 0;
}
.container {
width: 100%;
margin: auto;
margin-top: 0;
padding: 0;
}
.footer {
bottom: 0;
position: absolute;
}
So eine Fußzeile zu bekommen Ich versuche, meinen unter allen Inhalten aller enthält zu bleiben, aber manchmal springt er über den Inhalt des mitgelieferten Datei. Ich habe die meisten möglichen Sticky-Footer-Guides nachgeschlagen und versucht, sie anzuwenden, aber keine scheint so zu funktionieren, wie sie es sollten. Ich habe versucht, das jetzt für eine Weile zu beheben.
Hier ist der Footer-HTML-CSS:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/footercss.css">
<title>Footer</title>
</head>
<body>
<div id="containerf">
<div id="logos"></div>
<div id="foottext">
<a href="http://youtube.com" target="_blank"><img src="images/youtube.png" height="25" width="25"></a>
<a href="http://twitter.com" target="_blank"><img src="images/twitter.png" height="25" width="25"></a>
<a href="http://facebook.com" target="_blank"><img src="images/fbtrp.png" height="25" width="25"></a>
<b>| Schaafstraat 137 | © 2016 Kopala | All rights reserved.</b>
</div>
</div>
</body>
</html>
#containerf {
width: 100%;
height: 180px;
background-color: #006666;
position: absolute;
bottom: 0;
margin-bottom: 500px;
}
#foottext {
line-height: 180px;
text-align: center;
color: #d9d9d9;
}
#foottext img {
padding-right: 5px;
}
* "Hier ist die Fußzeile html css" * - Warum gibt es HTML Markup und CSS in dieser Datei? da sollten nur deine divs sein. Die Frage ist unklar, welcher Codecode welche Dateinamen ist. –
Schau dir deine (gerenderte) HTML-Quelle an und du wirst sehen, was ich meine, es wird ein Durcheinander sein. –
Mögliches Duplikat von [sticky footer question] (http://stackoverflow.com/questions/1980857/sticky-footer-question) – dippas