How do I get the height of an iframe to automatically adjust to the height of the content behing displayed?
-
Last search:
issues in implementing online loan applications
Xavier said
I have inserted an iframe into a table cell on my website. I have experimented with using percentages for the both the table cell height and/or the iframe height; however, none of these combinations seems to work.The page I'm framing in is an interactive vehicle inventory for which the initial listing may be a few thousand pixels high, but clicking on an individual vehicle goes to a page that might be less than 450 pixels in height. There are also other pages for contact forms and loan application forms that would be displayed within the iframe through buttons in the inventory details. These pages would be longer than the details page, but not as long as the inventory lists.My goal is to elimate the need for scrolling within the iframe while reducing the amount of wasted vertical space when the height of the iframe display page is not very tall.I prefer to accomplish this goal using HTML code only as I'm not very familiar with more advanced coding techniques.Thanks!
I have inserted an iframe into a table cell on my website. I have experimented with using percentages for the both the table cell height and/or the iframe height; however, none of these combinations seems to work.The page I'm framing in is an interactive vehicle inventory for which the initial listing may be a few thousand pixels high, but clicking on an individual vehicle goes to a page that might be less than 450 pixels in height. There are also other pages for contact forms and loan application forms that would be displayed within the iframe through buttons in the inventory details. These pages would be longer than the details page, but not as long as the inventory lists.My goal is to elimate the need for scrolling within the iframe while reducing the amount of wasted vertical space when the height of the iframe display page is not very tall.I prefer to accomplish this goal using HTML code only as I'm not very familiar with more advanced coding techniques.Thanks!
Adam said
Can't be done with HTML only.You'll need JavaScript (and people on the audience side having JavaScript enabled) to achieve this...In all honesty, I would say that it may be better to think of a different way to display things... having a single page that literally resizes elements whenever you view something can be disconcerting... or at least mildly confusing.I'm not a big fan of using popups, but this sounds like the *ideal* location for a popup window. Have the inventory listed in a scrollable table inside the iframe, and when people click on a link to an individual vehicle, open that in a popup - with a "close window" button included.With long lists you can never prevent scrolling, but changing the behavior of a single page element based on what it's displaying is not a good idea.Iframes do have their use... but beware of overuse (and keep people with older browsers in mind that may not have the ability to display them.)
Can't be done with HTML only.You'll need JavaScript (and people on the audience side having JavaScript enabled) to achieve this...In all honesty, I would say that it may be better to think of a different way to display things... having a single page that literally resizes elements whenever you view something can be disconcerting... or at least mildly confusing.I'm not a big fan of using popups, but this sounds like the *ideal* location for a popup window. Have the inventory listed in a scrollable table inside the iframe, and when people click on a link to an individual vehicle, open that in a popup - with a "close window" button included.With long lists you can never prevent scrolling, but changing the behavior of a single page element based on what it's displaying is not a good idea.Iframes do have their use... but beware of overuse (and keep people with older browsers in mind that may not have the ability to display them.)
Nicholas said
Iframes are probably not very optimal for what you're trying to do. HTML is extremely static and it's almost impossible to change on the fly. You can use some rather basic PHP coding to change the size of the Iframe, or better yet, draw your table (CSS is better, but to each their own) and use either an include() or require() function to show the page you want included.
Iframes are probably not very optimal for what you're trying to do. HTML is extremely static and it's almost impossible to change on the fly. You can use some rather basic PHP coding to change the size of the Iframe, or better yet, draw your table (CSS is better, but to each their own) and use either an include() or require() function to show the page you want included.
Repeat: How do I get the height of an iframe to automatically adjust to the height of the content behing displayed?
Are there any pay day loans available?
First time home buyer?
What do you do when your boss is making racial comments?
What can I do to stop my sister's bill collectors from calling me?
How will my credit score be affected with various residences within short time?
ALL Home New Questions New Answers Map RSS
home loan applications online