Jump to content
  • 0

Resizing an Iframe


pbullock

Question

I am trying to deploy on iframe on my website.  Iframe is the only deployment method available for me (for technical reasons).

This is my deployment code:

<iframe name="Add an Asset" title="Add an Asset" src="https://c0abf873.caspio.com/dp/896060006294dfe2bf154556bccc" width=100% height="100vh">Sorry, but your browser does not support frames.</iframe>

The iframe works fine in the width (at 100%), but the height only seems to grow about 50% of what it needs.  I see a vertical scrollbar that is unnecessary.I have also tried height=100% but this doesn't work at all.

I also tried this in the Custom CSS with no better results:

iframe {
    width: 100vw;
    height: 100vh;
}

Is there something I am missing here?

Phil

Capture.JPG

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
On 12/15/2017 at 10:53 PM, pbullock said:

I am trying to deploy on iframe on my website.  Iframe is the only deployment method available for me (for technical reasons).

This is my deployment code:


<iframe name="Add an Asset" title="Add an Asset" src="https://c0abf873.caspio.com/dp/896060006294dfe2bf154556bccc" width=100% height="100vh">Sorry, but your browser does not support frames.</iframe>

The iframe works fine in the width (at 100%), but the height only seems to grow about 50% of what it needs.  I see a vertical scrollbar that is unnecessary.I have also tried height=100% but this doesn't work at all.

I also tried this in the Custom CSS with no better results:


iframe {
    width: 100vw;
    height: 100vh;
}

Is there something I am missing here?

Phil

Capture.JPG

You may check this post. I posted script for the similar inquiry there

Link to comment
Share on other sites

  • 0
On 12/15/2017 at 12:53 PM, pbullock said:

I am trying to deploy on iframe on my website.  Iframe is the only deployment method available for me (for technical reasons).

This is my deployment code:


<iframe name="Add an Asset" title="Add an Asset" src="https://c0abf873.caspio.com/dp/896060006294dfe2bf154556bccc" width=100% height="100vh">Sorry, but your browser does not support frames.</iframe>

The iframe works fine in the width (at 100%), but the height only seems to grow about 50% of what it needs.  I see a vertical scrollbar that is unnecessary.I have also tried height=100% but this doesn't work at all.

I also tried this in the Custom CSS with no better results:


iframe {
    width: 100vw;
    height: 100vh;
}

Is there something I am missing here?

Phil

Capture.JPG

 

Hi Pbullock,

You can also try this approach:

<iframe name="Add an Asset" title="Add an Asset" src="https://c0abf873.caspio.com/dp/896060006294dfe2bf154556bccc" style="top:0;left: 0;width:100%;height: 100%; position: absolute; border: none"></iframe>

-Franchiser-

 

 

 

Link to comment
Share on other sites

  • 0

Hi @pbullock,

If you happen to to have the HTML <body> tag as the parent element of your iFrame, you may want to try this code over here. Works well for me as viewed in Google Chrome.

 

<body style="margin:0px;padding:0px;overflow:hidden">
	<iframe src="[your iframe deployment src without brackets]" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:100%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="100%" width="100%"></iframe>
</body>

 

Hope this helps.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...