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
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Netscape Height attribute...

    I'm trying to make this work in NS...

    I have a table that takes up 100% of the viewable area (<table width="100%" height="100%">)

    Inside that table there's a few sections...

    Code:
    <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
    <tr><td valign="top" width="100%" height="100%" bgcolor="#0000CC">
    <a href="test.asp"><img src="images/logotop.gif" border="0" width="208" height="72"></a><br>
    <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">			
    <tr><td width="13">
    <img src="images/spacer.gif" width="13" height="1">
    </td><td valign="top">
    <iframe src="text/about.htm" id="body_text" frameborder="0" width="100%"></iframe>
    </td><td valign="top" width="140">
    <!-- There is a menu here that I'll leave out of my post...-->
    </td></tr>
    </table>
    </td><td valign="top" width="50%" bgcolor="#FFFFFF">
    <img src="images/main.jpg" width="265" height="220"><br>
    <img src="images/details.gif" width="265" height="100"><br>
    </td></tr>
    <tr><td valign="top" align="center" width="100%" height="113" colspan="2" bgcolor="#FFFFFF">
    <img src="images/imagebar.gif" width="300" height="109"><br>
    </td></tr>
    </table>
    Now, first things first...
    In netscape (4 and 6) the height is majorly different from IE - does anyone know why this is and how to fix it?

    Secondly - when I stretch the IFrame to fit the entire width (width="100%") it shows fine - when I use the height property (height="100%") I can see it fine in IE - but it suddenly dissapears in NS6

    Anyone have any ideas for me?

    Thanks

    ~Quack

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    If you want to *properly* have tables stretch 100% of the viewable area:

    html, body {
    height: 100%;
    }

    .mytableclass {
    height: 100%;
    width: 100%;
    }


    Try using CSS to style your iframe as well, and see if that doesn't fix the problem:

    iframe {
    height: 100%;
    width: 100%;
    }

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, I didn't specify how the height was majorly different in NS

    The table overstretches the boundaries of the window - so, the height is more than 100%, and then the imagebar at the bottom is underneath that still...

    copy + paste the HTML and view it in IE and NS, you'll see what I mean.

    Thanks

    ~Quack

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts
    NN doesn't support the height attribute on tables. I couldn't find it in the HTML 4.01 standard either, nor in the CSS1 standard. It is in the CSS2 standard though, but i would advise against using a fixed height on a table anyway.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There is no HEIGHT attribute; use the CSS that jkd provided and it should work, but the overhang may occur if you have body margins, because in some browsers (mac ie5 for sure and maybe moz, but i can't remember) the width and height of the window does not compensate for body margins. You can allow for this by using 0 body margins.

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, the tables are working now, but I still have a problem with IFrame and NS6

    As soon as I specify any sort of height percentage to it (76%) it dissapears, I've tried with 25% too, and nothing...

    Anyone ever had this issue before?

    ~Quack


  •  

    Posting Permissions

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