Is there a way to create a dynamically sizing Iframe with a minimum height?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2015 01:24 PM
Hello All,
I have run into an issue while standing up a CMS content page. The page is using an Iframe to display a users requests, however, if the user prompts a window with an action and the window is larger than the Iframe, it gets cut off. Is there a way to either set a minimum height/size for an iframe while letting it be dynamic? Also, is there an easier/more efficient/smoother way to integrate catalogs/requests/knowledge articles/etc... into a CMS site without using Iframes?
Thanks,
Jake
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2015 01:20 PM
I've found somewhat of a workaround. I'm using bootstrap with my CMS implementation and by placing a HTML defined iframe in the following fashion I can avoid content being clipped by the iframe:
either
<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="…"></iframe>
</div>
or
<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src="…"></iframe>
</div>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2015 08:16 PM
Hi Jacob,
Did you try CSS?
I had a similar problem with the new Knowledge Base v3 pages in the CMS...
Using the frame name I forced the height using a custom style sheet that included this.
iframe#kb_viewer {
position: fixed;
height: 100%;
overflow-y: scroll;
}
Also the new CMS in Geneva is apparently a game changer so I would not worry about developing an alternate to iFrames.
Spend some time on Angular JS instead
Hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2015 11:09 AM
Great, Thanks Russell!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2015 11:01 AM
Hi Jacob,
I ran into a similar problem with the KB V3 clipping off and fixed it with a min-height attribute in a style sheet. Here's my fix:
iframe#knowledge_home { min-height: 950px; }
You may have to adjust the pixel height to meet your needs but that spaced our iframe up with our footer right where we needed it.