I have implemented this , but i have a problem .
When i am resizing the window screen to the minimize , the height of the iframe increases, but when i try to maximize , the height of iframe doesn't get decreased .
What can i do to achieve that ?
When i reduce the window width , the height of iframe gets increased ,
When i again put it at full width , you can see empty space below the iframe area.
Try this link as iframe
I have float content in it .
@davidjbradshaw
@ggtr1138 @outoftime @pomartel @vitoss @jbruni
@bhawin-boom - There are a few troubleshooting sections in the README. Maybe one of them may help:
https://github.com/davidjbradshaw/iframe-resizer#iframe-not-sizing-correctly
Check your CSS
@davidjbradshaw , I have checked my css . There are 2 divs . One is float:left; other is float:right ;.
and when the screen width is less than 700px , div with float:right becomes float:left;
I dont think that wrong to have
@jbruni , I have seen the Trouble shoot docs . Still getting the problem .
I have checked with each and every value of HeightCalculationMethod .
@jbruni , Anything you can share on this
@davidjbradshaw @jbruni , Forgive me if i am asking stupid questions here , When i put the content of https://www.profiledata.co.za/BrokerSites/NedbankPrivateWealth/SDOv3/components/companydetails.aspx?c=NED in a localhost file and then add it as an iframe , It works perfect.
Why SO ?
I also found one more issue ,
Lets say initial height of iframe is 300px and the screen is full width.
Now i resize the screen to the min . The height of iframe becomes 1100px
Now i resize the screen to full width fast , the the height i get is 600px instead of 300px .
How about that ?
@davidjbradshaw @jbruni
I had the same issue (the iframe not getting smaller in height again) and just got it resolved. For some reason putting the doctype as the first line in the iframe fixed it.
@Badestrand Could you please let me know if it is in the src page we need to include <!doctype html>
Sent from my iPhone.
I too have a similar issue @davidjbradshaw. But in my case, I have autocomplete available in the src page. Autocomplete will have some 200-300 options. When the options are shown, the list actually extends the body height to some 5000px, but when the option is selected and list of options are hidden, the height of iframe never reduces back to actual height, whereas in source page it works fine and the body scrollbar will be hidden.
I tried using bodyScroll, max, lowestElement options for heightCalculationMethod. But none of them resolves the issue. Should I be opening a new issue for this or you can suggest something here. :) Appreciate any help.
Check your CSS, and that you have a valid DocType
@davidjbradshaw Thank you so much.. It is working fine with added. I am using bodyScroll now. But I am just facing one more issue. We are using this with AEM, sightly where the html is something like below:
<sly聽data-sly-test.author="${wcmmode.edit || wcmmode.design}">
iframe component
</sly>
<sly聽data-sly-test="${properties.frameurl}">
聽聽聽聽聽聽聽聽<sly聽data-sly-use.constructedUrl="${'converturl.js' @ link=properties.frameurl}"></sly>
</sly>
<iframe src="${properties.frameurl}"聽scrolling="${properties.scrolling}"聽width="${properties.framewidth}"聽height="${properties.frameheight}"聽frameborder="0">
</iframe>
If I include
<sly data-sly-test.author=>
iframe component
<sly data-sly-test=>
<sly data-sly-use.constructedurl=>
<iframe src="falsehttps://bestellung.unitymediabusiness.de/iframe?upc=2PLAY200Bconverturl.jshttps://bestellung.unitymediabusiness.de/iframe?upc=2PLAY200B" scrolling="no" width="300px" height="200px" frameborder="0" id="iFrameResizer0" scrolling="no" style="overflow: hidden;">
</iframe>
</sly data-sly-use.constructedurl=></sly data-sly-test=></sly data-sly-test.author=>
Could you please let me know if it doesn't support this type of set ups or it will not work with sightly templates?
Sorry no idea about slightly templates
Most helpful comment
I had the same issue (the iframe not getting smaller in height again) and just got it resolved. For some reason putting the doctype as the first line in the iframe fixed it.