1

I have embedded a flutter web app onto my Wordpress site. The flutter app is connected to an API and has a varying height. Is there a way to make the Iframe change its height depending on what's shown in it?

My code so far:

<iframe src="My-URL" height="600" width="100%"></iframe>

Side note, is there a way to turn off scrolling when I hover over the iframe (I still need to be able to click on it).

scrolling="no"

doesn't seem too be working.

Thankful for all answers :)

SteAp
  • 11,853
  • 10
  • 53
  • 88
Adrian FG
  • 23
  • 1
  • 5
  • iframe dynamic height based on contents: https://stackoverflow.com/questions/9162933/make-iframe-height-dynamic-based-on-content-inside-jquery-javascript – GrafiCode Apr 20 '22 at 14:55
  • for the side note, does this css work? `iframe:hover { overflow: hidden; }` – GrafiCode Apr 20 '22 at 14:56
  • or maybe you mean turn off parent page scrolling while hovering the iframe? – GrafiCode Apr 20 '22 at 14:58
  • @GrafiCode `iframe:hover { overflow: hidden; }` doesn't do it. Since I want the iframe to show all of its contents no scrolling is needed. Now when I'm hovering over it and scroll nothing happens. I want to be able to scroll the whole page at that point. Ill try the link. Thanks! – Adrian FG Apr 21 '22 at 11:04
  • @GrafiCode I guess flutter doesn't work like normal html/js code, the solutions from [9162933](https://stackoverflow.com/questions/9162933/make-iframe-height-dynamic-based-on-content-inside-jquery-javascript) isn't working in this case. – Adrian FG Apr 21 '22 at 11:43

0 Answers0