Topic: Table height in NS. Why is it so evil? Pages that link to <a href="https://ozoneasylum.com/backlink?for=10621" title="Pages that link to Topic: Table height in NS.  Why is it so evil?" rel="nofollow" >Topic: Table height in NS.  Why is it so evil?\

 
Author Thread
maninacan
Paranoid (IV) Inmate

From: Seattle, WA, USA
Insane since: Oct 2001

IP logged posted posted 11-09-2001 01:18 Edit Quote

ok, so I'm redoing my site and everything seems to be going fine... AND THEN...
I realize that the height attribute of the TD tag does not work in Netscape. Now I'm wondering what to do, because I want to make the table height equal to 100%, but noooooooo, I can't. I have no idea what to do, please help.

P.S. You can go ahead and look at the page but there are a lot of tables and it will probably only cofuse you more so I recomend just trying to help me from what I've said above. Here's the link.


http://www.maninacan.com

Brian Sexton
Nervous Wreck (II) Inmate

From: Sunnyvale, California (USA)
Insane since: Nov 2001

IP logged posted posted 11-13-2001 09:53 Edit Quote

There is no height attribute for either TABLE or TD elements in HTML 4.01, so web browsers are not required to support them. CSS, however, does include a height attribute for TABLE elements, so that is your best bet if you are willing to concede perfect display on ancient browsers for the desired effect in modern browsers and HTML 4.01 standard compliance.

Netscape 6.2 seems to ignore the CSS height attribute for TABLE elements that are children of the BODY element, but not for DIV elements that are children of the BODY element nor TABLE elements that are children of DIV elements, so let's just put those facts together...

<DIV STYLE="width: 100%; height: 100%">

<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" STYLE="width: 100%; height: 100%">

<TR>

<TD BGCOLOR="#FFFFCC" ALIGN="CENTER" VALIGN="MIDDLE">Hello. This table is 100% wide by 100% high!</TD>

</TR>

</TABLE>

</DIV>

Note that I have made the background color a soft yellow; this is so you can tell if the effect is truly working by placing it over another color, such as the usual default white or gray. At first, I used borders to demonstrate the edges of the DIV element and the TABLE element, but Netscape put those borders beyond the 100% width and height, causing scrollbars to appear. As I recall, there is an attribute to make the width absolute--including borders--but I don't recall off hand what it might be, so you can look it up if it interests you.

I hope that helps you!



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu