Results 1 to 4 of 4

Thread: Iframe resizing dynamically to browser page size

  1. #1
    Join Date
    Oct 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Iframe resizing dynamically to browser page size

    Is there a way to resize an iframe dynamically to fit the browser`s size ?
    I can do it with tables and frames, but not with iframe. Why?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Are percent width/heights valid in iframe tags?
    <iframe width="100%" height="5%">
    whatever you want... should work.
    Unless percents aren't valid, which they might not be. I think they are, though.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I did try that, and it did not work.
    The frame is within a table, maybe it has something to do with it.
    Here the test page of what I'm trying to accomplish, the white box is the iframe
    http://gaspe.cgaspesie.qc.ca/mineralogie/index2.php

    here is the line of code:
    <? echo '<iframe id="myframe" src="' . $contenu . '" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; height:100%; display:none"></iframe>'; ?>
    and I did try with the line :
    <? echo '<iframe src="' . $contenu . '" width=100% height=100% frameborder="0"></iframe>'; ?>
    and got the same result.

    I want to get rid of the buttons that adjust the page size manually, like in the original site :
    http://gaspe.cgaspesie.qc.ca/mineralogie
    Last edited by crioux; 10-16-2006 at 06:30 PM.

  4. #4
    Join Date
    Oct 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I did find a script with javascript that work. There are still some rough edges, but I think I will be able to work out something out of it.
    Here it is:
    http://www.dyn-web.com/dhtml/iframes/
    Thanks.

Bookmarks

Posting Permissions

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