WordPress.org

Forums

iframe Shortcode
[resolved] Automatic 100% height? (4 posts)

  1. 3x7
    Member
    Posted 3 years ago #

    Hi,

    great plugin, but I still wonder is it possible to set the height to 100%, or to automatically detects the height of the content being displayed?

    thanks

    http://wordpress.org/extend/plugins/iframe-shortcode/

  2. Jackson
    Member
    Plugin Author

    Posted 3 years ago #

    You can adjust the height attribute within the code you're inserting:

    <iframe height="100%"...

    That should set the iframe to fill the space within your layout, but does not take into account the height of the content inside the iframe.

    Detecting and auto-adjusting the height is beyond the scope of this little plugin. But it can be done - if the iframe is coming from the same domain as the calling page - which it usually isn't.

    Here's a jQuery solution for auto height (provided content is on the same domain)

    http://sonspring.com/journal/jquery-iframe-sizing

    Hope that helps!

  3. 3x7
    Member
    Posted 3 years ago #

    thank you for explanation... will try with the plugin...

    Content that I want to display is from another domain... so I guess I should forget about "no scroll bars" or do you have a better idea how to deal with this?

    Thanks

  4. Jackson
    Member
    Plugin Author

    Posted 3 years ago #

    If you have some expectation of the height of the content, you can set the iframe accordingly to avoid scroll bars. If the height of the content is constantly variable over a wide range then you might be better off with a non iframe solution like jQuery's load() function.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • iframe Shortcode
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic