dynamic iFrame height

Discussion in 'JavaScript' started by r1919, Dec 2, 2008.

  1. #1
    Hi,

    i hope i this is the right place for that.
    i have a page with an iframe and i want that iframe to be displayed full height (without scrolls).
    i can not set the height because the content can be other on the next day.
    here's my code:

    <div id="content">
    <iframe id="myiframe" src="mypage.html" width="515" frameborder="0"></iframe>
    </div>

    it's there a way to make div height same as iframe height?

    this is the page: http://r3lu.sepcile-rosii.com/Livescore-Fotbal.php
    (here the height is set to 800)

    let me know if there is any solutin.
    thank you in advance
     
    r1919, Dec 2, 2008 IP
  2. r1919

    r1919 Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    no one? nothing?
    i tried to inspire from www.flashsore.com but without success.
    can anyone help me?
     
    r1919, Dec 4, 2008 IP
  3. Jake-Johnson

    Jake-Johnson Peon

    Messages:
    839
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    
    <div id="content" style="width: 800px;">
    <iframe id="myiframe" src="mypage.html" width="515" frameborder="0"></iframe>
    </div>
    
    PHP:
    This what you mean? Please clear your words, I can help you.
     
    Jake-Johnson, Dec 4, 2008 IP
  4. r1919

    r1919 Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yes,
    and I want that the div height to dynamic.
     
    r1919, Dec 4, 2008 IP
  5. r1919

    r1919 Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    now it's like that but if iframe is bigger than 800 appear a vertical scorll.
    <div id="content" style="height: 800px;">
    <iframe id="myiframe" src="mypage.html" width="515" frameborder="0"></iframe>
    </div>
     
    r1919, Dec 4, 2008 IP
  6. Jake-Johnson

    Jake-Johnson Peon

    Messages:
    839
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    
    <div id="content" style="height: 800px; overflow: auto;">
    <iframe id="myiframe" src="mypage.html" style="width: 100%; height: 100%;" frameborder="0"></iframe>
    </div>
    
    PHP:
    Try this.
     
    Jake-Johnson, Dec 5, 2008 IP
  7. r1919

    r1919 Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    this will make my iframe height 800px and if the content is bigger will add a scrollbar. :(
     
    r1919, Dec 6, 2008 IP