Iframe wird zu klein in div angezeigt
Hey Community,
ich habe ein Problem mit einem <iframe> in einem <div>. Das iFrame wird nicht ganz angezeigt da mein div nicht hoch genug ist. Ich habe auch schon versucht das div mittels
anzupassen. Dann wurde das iframe garnicht mehr angezeigt.
Anbei noch der betroffene Codeblock:
Hat jemand eine Lösung für mein Problem?
Gruß Thomas
ich habe ein Problem mit einem <iframe> in einem <div>. Das iFrame wird nicht ganz angezeigt da mein div nicht hoch genug ist. Ich habe auch schon versucht das div mittels
style="width: 350px; height: 260px;
Anbei noch der betroffene Codeblock:
<div class="info">
<legend>Priorität:
<?php // Prio
echo $row[9] . " • ";
?>Mitteiler:
<?php // Mitteiler
echo $row[2];
?>
• Alarmzeit:
<?php // Alarmzeit
echo date("H:i", $row['time']);
?>
</legend>
<?php
// Wir prüfen mal, ob wir denn den FMS Status anzeigen sollen
if ($parameter['FMSSTATUSALARM'] == "true") {
echo "<iframe height='32' width='100%' src='fms/status-alarm.php'></iframe>";
}
?>
</div>
Hat jemand eine Lösung für mein Problem?
Gruß Thomas
Please also mark the comments that contributed to the solution of the article
Content-Key: 327578
Url: https://administrator.de/contentid/327578
Printed on: April 20, 2024 at 00:04 o'clock
7 Comments
Latest comment
Huhu,
versuch mal das mit der Style.css
LG Yannosch
EDIT:
wäre sogar noch einfacher
versuch mal das mit der Style.css
div {
width: 100%;
height: 0;
padding-bottom: 56%; /* Wert für Dimensionsänderung */
position: relative;
}
div iframe {
width: 100%;
height: 100%;
position: absolute;
display: block;
top: 0;
left: 0;
}
LG Yannosch
EDIT:
iframe {
display:block;
width:100%;
}
wäre sogar noch einfacher