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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Internet Explorer Iframe in table in ie7

    Hi!

    Im trying to make an Iframe in a table and want to use the height 100% but I get a box insted that is around 150px and nomather what I set the % I always get the same size.

    [<table width="70%" border="0" cellspacing="0">
    <tr>
    .
    .
    .
    .
    <td width="100%" height="100%" valign="top"><iframe name="inst" height="100%" width="100%"></iframe></td>
    </tr>
    </table>
    </body>
    </html>]

    I have just a long line of td in the middle but nothing set to hight.

  • #2
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,736
    Thanks
    0
    Thanked 241 Times in 236 Posts
    Hi there sseebbee,

    and a warm welcome to these forums.

    If I was asked to name the three worst things in the world, I would say, without hesitation...

    an iframe, a table and IE7

    When using width="100%" or especially height="100%" for an element, you must make certain
    that it's parent has a specified width or height value.

    coothead

  • Users who have thanked coothead for this post:

    sseebbee (11-09-2012)

  • #3
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by coothead View Post
    Hi there sseebbee,

    and a warm welcome to these forums.

    If I was asked to name the three worst things in the world, I would say, without hesitation...

    an iframe, a table and IE7

    When using width="100%" or especially height="100%" for an element, you must make certain
    that it's parent has a specified width or height value.

    coothead
    Thank you!

    do you know if there is anyother way to make an iframe match the size of the screen while it´s in a td?

  • #4
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,736
    Thanks
    0
    Thanked 241 Times in 236 Posts
    Hi there sseebbee,

    I certainly would not use the "table element" and although a little pained to use an iframe, I would code it like this...
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    
    <title>full size Iframe</title>
    
    <style type="text/css">
    html,body {
        height:100%;
        margin:0;
     }
    #container {
        height:100%;
     }
    #container iframe {
        display:block;
        width:100%;
        height:100%;
        border:0;
     }
    </style>
    
    </head>
    <body>
    
    <div id="container">
     <iframe src="http://www.codingforums.com/showthread.php?t=281677" frameborder="0"></iframe>
    </div>
    
    </body>
    </html>
    
    coothead

  • #5
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by coothead View Post
    Hi there sseebbee,

    I certainly would not use the "table element" and although a little pained to use an iframe, I would code it like this...
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    
    <title>full size Iframe</title>
    
    <style type="text/css">
    html,body {
        height:100%;
        margin:0;
     }
    #container {
        height:100%;
     }
    #container iframe {
        display:block;
        width:100%;
        height:100%;
        border:0;
     }
    </style>
    
    </head>
    <body>
    
    <div id="container">
     <iframe src="http://www.codingforums.com/showthread.php?t=281677" frameborder="0"></iframe>
    </div>
    
    </body>
    </html>
    
    coothead

    Thx that worked but I didn´t get it to work within a td. I need the iframe+a meny to be centered next to eachother at the same height. If you want I can send the whole coding of the page and you can see what I mean?

  • #6
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,736
    Thanks
    0
    Thanked 241 Times in 236 Posts
    Hi there sseebbee,

    sorry, but I do not code for table layouts or IE 7 but, if I am feeling a little lackadaisical,
    I will occasionally provide code for an iframe.

    Someone else may wish to help you, but whilst waiting you could read some of these links...

    coothead


  •  

    Posting Permissions

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