Page 1 of 1
Is it possible to make the embed tag have dynamic height
Posted: Sun Jul 27, 2014 4:17 am
by Griffin
So I've made a forum page on my website with a mybb forum "iframed" in with the embed tag you guys use. My problem is I would like the height of the embed tag to resize to the information on the screen.
If you look now I have the height set to something like 2000px just so I can see the whole forum and under the forum there is a lot of white space.
http://easttowestdiversity.com/index.php?page=forum
Thanks in advance for any help you guys can give.

Re: Is it possible to make the embed tag have dynamic height
Posted: Sun Jul 27, 2014 10:24 am
by chandra
Ask Mr. Google

- there are some javascripts out there to do that.
Re: Is it possible to make the embed tag have dynamic height
Posted: Sun Jul 27, 2014 4:46 pm
by Njit
Re: Is it possible to make the embed tag have dynamic height
Posted: Sun Jul 27, 2014 11:56 pm
by Griffin
Yeah I was trying to work something out like that, but where cmsms uses the embed tag and not the iframe tag I couldn't figure it out.
Re: Is it possible to make the embed tag have dynamic height
Posted: Mon Jul 28, 2014 2:07 am
by calguy1000
I read through the code, and though I haven't tested it, there is 'supposed' to be some dynamic iframe resizing functionality inside the 'embed' tag.
Try using the optional name parameter in both actions.
Re: Is it possible to make the embed tag have dynamic height
Posted: Mon Jul 28, 2014 2:18 pm
by Griffin
Tried that with no luck

Is there a way to bypass the ebmed tag so I can use a regular Iframe and use javascript to resize it?
Re: Is it possible to make the embed tag have dynamic height
Posted: Tue Jul 29, 2014 8:17 am
by Geoclaps
I have not tested this but couldn't you instead use:
In your template put:
Code: Select all
<div class="forum">
{literal}<__iframe src="http://www.url-of-your-forum.com"></__iframe>{literal}
</div>
*<__iframe should be without the "__" ofcourse but this forum won't let me

it replaces the < with <__ ...
In your CSS put:
Code: Select all
.forum { height: 100%; overflow: auto; }
.forum iframe { height: 100% /*dynamic*/ }
This way you can at least have more control over the iframe.