I am trying to make the iFrame length relative to the length of the information in the widget (payment form, description, etc). I do not want there to be any scrolling in the iframe, but need the iframes height to adjust based on the length of the info in the form. Here is the code I am using:
<style>.embed-container { position: relative; padding-bottom: 100%; height: 0; overflow: hidden; max-width: 100%; height: auto; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class="embed-container"><iframe SRC="https://connect.clickandpledge.com/w/Organization/cityofrefugeinc/paymentwidget/78919d94-f538-46fa-8be4-9eb54ec13f79" frameborder="0" allowfullscreen></iframe></div>
Right now, people have to scroll down in the iframe and it is confusing some of them because they don't really know that it is scrollable. I tried taking all of the preset code out and just use the iframe to make my own width and height, but there is a massive amount of white space when the form is not that long. Here is an example of what that looks like:
And here is the code I used for this:
<iframe align="middle" frameborder="0" width="550" height="1500" scrolling="no" SRC="https://connect.clickandpledge.com/w/Organization/cityofrefugeinc/paymentwidget/78919d94-f538-46fa-8be4-9eb54ec13f79" frameborder="0" allowfullscreen></iframe>
So, just need to know how to modify your iframe code in order to make it relative so we don't run into this issue.
Thanks!
Jason
<style>.embed-container { position: relative; padding-bottom: 100%; height: 0; overflow: hidden; max-width: 100%; height: auto; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class="embed-container"><iframe SRC="https://connect.clickandpledge.com/w/Organization/cityofrefugeinc/paymentwidget/78919d94-f538-46fa-8be4-9eb54ec13f79" frameborder="0" allowfullscreen></iframe></div>
Right now, people have to scroll down in the iframe and it is confusing some of them because they don't really know that it is scrollable. I tried taking all of the preset code out and just use the iframe to make my own width and height, but there is a massive amount of white space when the form is not that long. Here is an example of what that looks like:
And here is the code I used for this:
<iframe align="middle" frameborder="0" width="550" height="1500" scrolling="no" SRC="https://connect.clickandpledge.com/w/Organization/cityofrefugeinc/paymentwidget/78919d94-f538-46fa-8be4-9eb54ec13f79" frameborder="0" allowfullscreen></iframe>
So, just need to know how to modify your iframe code in order to make it relative so we don't run into this issue.
Thanks!
Jason
Comment