+ Reply to Thread
Results 1 to 9 of 9

Thread: Resizing iframe to fit content

  1. #1
    Join Date
    Oct 2005
    Location
    San Diego County
    Posts
    745

    Default Resizing iframe to fit content

    Deos anyone know if it's possible for my iframe to resize based on the amount of information being sent by the url I'm framing? Keeping in mind that it's not on the same domain. I've Google the heck out of this and keep hitting dead ends. So far, I only been able to determin that this is possible only if the page being framed is on the same domain.

    As an example, 1Park Place which is a 3rd party IDX supplier also provides a monthly newsletter as a url that must be framed. Sometimes this newsletter is longer than other times. I would like my iframe to resize based on the amount of information in the newsletter or IDX.

    Thanks.
    Looking for a great deal on San Diego real estate? Search all San Diego homes for sale including San Diego luxury homes, foreclosures and short sales. Find local area information, San Diego home values, schools, google maps and much more.

  2. #2
    Join Date
    Apr 2004
    Location
    Nanaimo
    Posts
    16,026

    Default Re: Resizing iframe to fit content

    Not that I know of - I typically set my iframe height much higher than needed so no matter how long the content that is out of my control becomes, it does not create vertical scrolling.
    Starting LEC 7 soon but it won't be called LEC 7 - LEC 2012 coming soon!

  3. #3
    Join Date
    Oct 2005
    Location
    San Diego County
    Posts
    745

    Default Re: Resizing iframe to fit content

    You're a busy guy tonight! Thanks for all your responses to all my questions. I was afraid this one might be a no, I did exactly what you said and set my height really high so the scroll never came up, I was just hoping for a different solution. Oh well, it was wishful thinking! Thanks again!
    Looking for a great deal on San Diego real estate? Search all San Diego homes for sale including San Diego luxury homes, foreclosures and short sales. Find local area information, San Diego home values, schools, google maps and much more.

  4. #4
    Join Date
    Apr 2004
    Location
    Nanaimo
    Posts
    16,026

    Default Re: Resizing iframe to fit content

    Not a problem, have a great night Josh
    Starting LEC 7 soon but it won't be called LEC 7 - LEC 2012 coming soon!

  5. #5
    Join Date
    Sep 2006
    Posts
    156

    Default Re: Resizing iframe to fit content

    how do you add the iframe so that if you have the height on it really big it doesn't make the page look bad ? You have it at the bottom of the page ? Because if you'd add it on middle and set the height on it really big, and you don't have enough content on it, you'll have a lot of space coming up

  6. #6
    Join Date
    Oct 2005
    Location
    San Diego County
    Posts
    745

    Default Re: Resizing iframe to fit content

    Quote Originally Posted by DMike View Post
    how do you add the iframe so that if you have the height on it really big it doesn't make the page look bad ? You have it at the bottom of the page ? Because if you'd add it on middle and set the height on it really big, and you don't have enough content on it, you'll have a lot of space coming up
    You can't, unless the information you're framing is on the same domain. This is the problem with iframes, your only reason for setting the height really high is so you will never have to scroll through the information you're framing. As far as where on the page, I would have it at the very top. If you put it at the bottom, not only will you have a large white space above the info, but guests might not see it and move on. Plus, their would be a scroll for the information your framing because their would be no room underneath what your framing for it to expand. Make sense?

    The reason you can't resize the iframe to match the information being framed is for security reasons, you can only do so if the information you're framing is on the same domain.

    I hope this helps clarify.
    Looking for a great deal on San Diego real estate? Search all San Diego homes for sale including San Diego luxury homes, foreclosures and short sales. Find local area information, San Diego home values, schools, google maps and much more.

  7. #7
    Join Date
    Apr 2006
    Location
    Orange County, CA
    Posts
    902

    Default Re: Resizing iframe to fit content

    As far as I know, the only way you can have the height of the iframe adjust automatically to the page you're pulling in from a different domain is if you are able to add some code to the pages that are on the other domain.
    ---cK

    CK Chung is an independent SEO consultant who provides premium Holistic SEO services, including services specific to Real Estate SEO. You can find his alter-ego, Kid Disco, spouting off on his SEO blog at SEOdisco.

  8. #8
    Join Date
    Sep 2006
    Posts
    156

    Default Re: Resizing iframe to fit content

    How about a small javascript which would just add let's say 50px to the iframe's height while the iframe has scroll on it. That might do it. I'll check it out and send you guys what i came up with

  9. #9
    Join Date
    Sep 2006
    Posts
    156

    Default Re: Resizing iframe to fit content

    Just cheked it out, it seems you can't get the height of the document you use as src in your iframe if it's not on the same domain. One thing you can do here is to cache the file you want to iframe and that way you have it on the same domain.

+ Reply to Thread

Similar Threads

  1. Content : How much is enough?
    By Northern_IL in forum Google
    Replies: 10
    Last Post: 12-18-2007, 06:41 PM
  2. Google: Changes In Ranking Strategies
    By gonner in forum Google
    Replies: 13
    Last Post: 10-05-2007, 03:11 AM
  3. Getting Around Duplicate Content Issues
    By erogers in forum Article Writing
    Replies: 7
    Last Post: 08-30-2007, 09:47 AM
  4. Content and Blogs
    By Northern_IL in forum Google
    Replies: 3
    Last Post: 08-29-2007, 10:02 AM
  5. Content & Copyright Thieves
    By Phoenix in forum Real Estate Chat
    Replies: 24
    Last Post: 06-01-2005, 05:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts