OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
Table height in NS. Why is it so evil?
This page's ID:
10621
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
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! :)
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »