Resizing the iframe when embeding Course Presentaiton
Submitted by ol_lu on Sun, 09/11/2016 - 23:13
Forums:
Hi all,
I am embedding the Course Presentation that I created on h5p.org. The iframe is fully responsive, but I cannot resize it so it's smaller on the page.
Please let me know if I can resize it and how.
Thank you!
Oleg
thomasmars
Mon, 09/12/2016 - 09:58
Permalink
Hi Oleg,
When getting the embed code you have the option of inputting the size of the iframe. You will get a code similar to this:
Replacing width="1090" and height="674" with your desired values should give your iframe a different size, e.g. width="640".
ol_lu
Tue, 09/13/2016 - 07:16
Permalink
Resizing iframe
Hi Thomas,
I tried various options, but it does not resize. I wonder if there is some setting in moodle that may overwrite the parameters of the iframe (may be CSS).
I tried even placing it in a div and nothing happened.
Oleg
icc
Tue, 09/13/2016 - 09:44
Permalink
What do you see if you right
What do you see if you right-click the element and choose the 'Inspect' option? How does the iframe code look?
Placing it in a div like you said should work as well. If you open your web browser's console (Ctrl+Shift+J in Chrome) do you see any error messages?
roman
Mon, 10/31/2016 - 14:03
Permalink
Having the same issue
Hi all, came across this as I was researching the same issue. If I embed using the iframe, with a width and height set, but include the JS for resizing, it applies a width: 100% to my iframe. This would work fine if the embed was in a container like a div with a width set, but it is not. To fix this I add style="max-width: 800px;" where the 800px is the size I originally had set for the iframe. I think this might be a good addition to the resize.js to look at the original width/height set and not make it go bigger than those. I am not sure how browser friendly it is, but most new browsers should be ok with it.
thomasmars
Tue, 11/01/2016 - 09:36
Permalink
Hi,
Setting a fixed size in pixels and the resize script is not compatible with each other. If you set the width and height of the iframe you should not include the resize script, since it will always try to give the content type enough room. Have you tried to just remove the resize script?
roman
Tue, 11/01/2016 - 14:28
Permalink
Hello
Removing the resize script is not an option for us as the objects are than not resonsive as much. I understand that my solutions is not ideal, and usually these objects would be embeded into a container like a div with a set width. Where we are having them embeded there is no containing div, and no easy way for us to create one, so setting a max-width on the object worked real well. :)
thomasmars
Wed, 11/02/2016 - 11:23
Permalink
I see, thank you for this
I see, thank you for this insight.
Hopefully someone can make use of this that is in a similar situation :)
nkearns
Tue, 05/16/2017 - 12:13
Permalink
iframe embedded in moodle has horizontal scroll bar
I have tried some of the suggestions above but cannot get rid of the horizonatal scroll bar on the iframe when I embed it (from my H5P account) into a label in Moodle. It works fine however, when I use the Moodle integrated H5P iframe embedded activity - no horizontal scroll bar shows. I tried including a max-width setting but it doesn't work.
tim
Thu, 05/18/2017 - 09:44
Permalink
Hi nkearns,thanks for
Hi nkearns,
thanks for reporting this. I've created an issue in the Core Team's ticketing system:
https://h5ptechnology.atlassian.net/browse/HFP-1107
The person handling the bug will reply to your comment once it's been resolved.
Thanks,
Tim
mariaso
Mon, 06/05/2017 - 07:15
Permalink
Maybe a table can help you?
For us it worked great since we generally put everything in a table that has a width of 800 px. We use moodle. Try that? and if it doesn't work try removing the width and height as well as having it in a defined table.
sabined
Tue, 08/20/2019 - 17:59
Permalink
Same issue
Hello ! Same issue.
I put my iframe with the video on a Moodle, in a table.
I tried changing the size in the <iframe>. But during the loading of the page you see that another layer of CSS comes and destroys my own.
I tried to change the <td> </td> size and remove the code widht and height in the <iframe> so that the video ajust to the <td> size, but it just make it smaller in height with a scroll bar.
Does someone has a solution ?
P.S : sorry for my poor English
E.McGraw-Austin
Mon, 05/03/2021 - 19:42
Permalink
sizing
Hi- thanks for all of your above comments. Other than putting the embed code in a table, has there been any progress on being able to resize H5p entries? I am using Blackboard Learn.
thanks, E
kimberlyscott05...
Tue, 06/29/2021 - 23:37
Permalink
Sizing
I would like to know the same thing as I am using Blackboard Learn too.