How to set the maximum height / width of an iframe element? When I try to set in styles css: max-height, max-width nothing happens. But also nothing happens if you prescribe styles inside the iframe itself.

<script> $("#resizable").resizable(); <!-- растягиваем на своё усмотрение элемент iframe --> </script> <style> iframe { resize: both; } <!-- стиль iframe растягивания --> </style> <head> <link rel="stylesheet" type="text/css" href="pnstyle.css"> <title>Расчёты</title> </head> <body onload='slideToggle();'> <center> <table align="center" style="margin-top:-55px;"> <tr><td height="50px;"> </td></tr> <tr> <td> <a href="index.html"><b>Главная</a> <a href="raschetu.html"> Расчёты</a> <a href="reg.html">Войти</a> <a href="spravka.php">Справка</a> </td> </tr> </table> <div class="toggle_item"> <!--"расчёт 1"--> <h3 class="toggle_triger">Расчёт колонны заливочных труб</h3> <div class="toggle_content"> <!-- скрывваем/раскрываем контент расчёта --> <iframe scrolling="no" height="330" width="650" frameborder="0" style="border: 2px solid black" src="pr1.html"></iframe> <!-- полоса прокрутки выключена, вместо неё пользователь будет растягивать подрасчёт, как он хочет --> </div> </div> 
  • {height: 100%; width: 100%;}? And it is necessary to specify not the maximum, but the minimum then. Give an example of your code, or screenshots that show the problem - Vasily Barbashev
  • iframe should "adapt to the content of the content, in my case it is a form with tables in which calculations are made - Rem
  • Finally I fixed it myself, I throw the whole corrected script into question - Rem

0