diedVIPs

html knowhow

IFramehöhe dem Inhalt anpassen










IFramehöhe dem Inhalt anpassen

So sieht´s aus
Quellcode
<html>
<head>
<script>
window.addEventListener("load", fenster);
window.addEventListener("resize", fenster);

function fenster() {
if (parent.document.getElementsByTagName("iframe")[0]) {
parent.document.getElementsByTagName("iframe")[0].style.height =
document.getElementsByTagName("html")[0].offsetHeight +'px';
}
}
</script>

<style type="text/css">Hier nichts</style>
</head>

<body>
<script>
window.addEventListener("load", fenster);
window.addEventListener("resize", fenster);
function fenster() {
if (parent.document.getElementById("eineID")) {
parent.document.getElementById("eineID").style.height =
document.getElementsByTagName("html")[0].offsetHeight +'px';
}
}
</script>
<iframe src="../index.php" id="eineID" style="width: 100%"></iframe>

</body>
</html>











Kontakt    Datenschutz   Impressum