FORUMS: list search recent posts

resizable iframes!

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
victor cooperresizable iframes!
by on Apr 8, 2010 at 5:18:20 pm


Hi all,

I am pretty new to web design and I am using a resizable iframe. It is working great for when the page is loaded inside of theiframe. My problem is that I have an accordion on one of the pages that when first loaded is only 500px high and the iframe adjusts fine, but when you open the accordion it grows to over 1000px high and the overflow just disappears in behind the iframe. Is there some javascript that will allow the iframe to grow as the page content grows? Am I making any sense?

Thanks

Victor.


Return to posts index

Curtis ThompsonRe: resizable iframes!
by on Apr 8, 2010 at 5:36:11 pm

hello...

short answer is that you need to adjust the height of the iframe as the page height changes...so any time you change the height of the page via some other element, you need to figure out the page height (search "page height javascript" (sans quotes) in google to learn more about that) and then assign that height (or some subset of it) to the iframe...

sitruc


Return to posts index

victor cooperRe: resizable iframes!
by on Apr 8, 2010 at 6:41:09 pm

Hi Curtis,

Thanks for the quick reply. This sounds like an extremely time consuming way to do things. I have accordions with ten to twelve drop down menus all different sizes and all changing daily. Changing the code that often would be insane.

Is there perhaps a completely different route that I can take? I have a footer below the iframe that floats up or down according to the iframe size and that works nicely but the iframe still needs to resize when page content resizes.

Thanks,

Victor.


Return to posts index


Curtis ThompsonRe: resizable iframes!
by on Apr 8, 2010 at 7:16:01 pm

hello...

if your accordion is not in a global file then ya - it will be hard to do, but if you want to change the height of the iframe as the page height changes, you will have to do something similar to what i've described here. there is no quick fix to tell a component to automatically resize itself to a specific height in relation to another element...

w/o seeing your situation, i can't say, but you could also potentially make the height of the iframe a % value, but i doubt it would get you what you need...

hard to offer much else w/o a working example of your site, i'm afraid...

sitruc


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]