HowTo resize iFrame to whole browser window

I found a thread here which told me how to show an url in a iFrame on my dashboard. I used the example flow there :).

This works fine, but I only find a way with fixed height and width. I wanted to use all availabe space on my screen. And this is different. Depending on the device. Also, if possible I want to support different url's to the template.

Searching for this problem is something for a specialist. I don't know html, css,... So can someone please help me with a example flow or the tags I have to use.

And the iFrame is always too small:

Width should be easy enough. I would guess that setting the iframe tag to have a class containing width: 100%; (or doing the same on a style attribute) would probably take care of that. Though sometimes you may need to make it slightly less than 100% to stop the browser generating extra scroll bars.

Height, I would have thought should be left on automatic unless you want to fix it to the view height - in that case, you may be able to make it 100vh. Again, you might need to adjust somewhat to allow for other things on screen.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.