Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: iframe height

  1. #1
    Regular Coder
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    528
    Thanks
    8
    Thanked 8 Times in 8 Posts

    iframe height

    Howdy...

    I have an iframe set up as such:

    <iframe name="tourney" src="tourneyonline.php" width="99%" height="45%" frameborder="0"></iframe>

    This works perfectly in firefox.. and not in IE.. in IE it doesn't do % of browser.. instead I end up with an extremely large iframe.

    I attempted to do it in CSS with a style="width:99%;height:99%;" but not only did this not work in IE, but it made my iframe in firefox extremely small..

    Any help appreciated!

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Where's the rest of your code? You know that percentages are taken as a percentage of the dimensions of the iframe's parent element and not the browser's viewport, right? If you have a parent element with dimensions of 100&#215;100 pixels, then the iframe's dimensions would be 99&#215;45 pixels and 99&#215;99 pixels based upon your code above.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

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