I have that structure in my code. Height of my iframe is not fixed, it oscillate.
<div>
<iframe></iframe>
</div>
I want that the div height to be iframe height.
I thought in
<div height=100%> .. </div>
but it doesnt works
Sorry for by bad English and Thanks!
My code:
<div style="position: relative;
height:1000px; ">
<iframe frameborder="0" scrollable="no" src="/driv.php" style="position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;"></iframe>
EDIT:
<div class="mydiv" style="position: relative;
height:1000px ">
<iframe class="myif"frameborder="0" scrollable="no" src="/pilotos2.php" style="position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;"></iframe>
</div>
<script type="text/javascript" language="javascript">
$('.mydiv').css('height', $('.myif').height()+'px');
</script>
I tried that and doesnt works..