View Full Version : Cell height issue with Safari
jlogin
Nov 23, 2004, 06:25 PM
I'm trying to figuire out a problem in safari:
The code below contains a table that has three rows. The cell in the second row has a height of 100%, and a green background. How do I get the middle row to actually expand so that the green background fills in the whole area between the top row and the bottom... am I missing something?
<table cellpadding=0 cellspacing=0 height=500 border=1>
<tr>
<td>
asdfsad
</td>
</tr>
<tr>
<td bgcolor=green height="100%">
sd
</td>
</tr>
<tr>
<td>
asdfsd
</td>
</tr>
</table>
ChicoWeb
Nov 23, 2004, 08:35 PM
Safari, and most browsers do not like height=100%. I hear it is fixed in the next release. I have the same problem on my web portfolio site.
jlogin
Nov 24, 2004, 01:36 PM
Safari, and most browsers do not like height=100%. I hear it is fixed in the next release. I have the same problem on my web portfolio site.
By most browsers you mean most Mac browsers... right. This has always worked on IE and Mozilla on a pc... Seems like such a basic thing.
ChicoWeb
Nov 24, 2004, 02:33 PM
By most browsers you mean most Mac browsers... right. This has always worked on IE and Mozilla on a pc... Seems like such a basic thing.
Well, IE "gives" a lot on standards compliancy. I do not believe Height="100%" is valid actually. But like I said, it will be fixed in the next version.
jeremy.king
Nov 24, 2004, 03:06 PM
Since your table is of fixed height, just define fixed heights on ALL of your rows, not just the middle one.
jlogin
Nov 24, 2004, 03:53 PM
Since your table is of fixed height, just define fixed heights on ALL of your rows, not just the middle one.
The actual table I am working with has a height of 100%. I just set a static height on the example for testing purposes. The table is part of a template, with the top row being a header, the middle being for content, and the bottom being a footer. In the content row is another table with two columns. The left column is for Nav/Callout, and the right is main content. The left column of the nested table has a background color and a colored border. Because of this issue, when there is not enough content on the page, the nested table does not reach the bottom of the page... because the cell it is in does not meet the top of the footer. I guess people on Macs will have to deal with it looking odd... not much I can do about it.
So when does this new version come out?
ChicoWeb
Nov 24, 2004, 04:56 PM
The actual table I am working with has a height of 100%. I just set a static height on the example for testing purposes. The table is part of a template, with the top row being a header, the middle being for content, and the bottom being a footer. In the content row is another table with two columns. The left column is for Nav/Callout, and the right is main content. The left column of the nested table has a background color and a colored border. Because of this issue, when there is not enough content on the page, the nested table does not reach the bottom of the page... because the cell it is in does not meet the top of the footer. I guess people on Macs will have to deal with it looking odd... not much I can do about it.
So when does this new version come out?
With the new OS
zim
Nov 24, 2004, 06:01 PM
Height is not a true attribute. Safari and other browsers that are ignoring it are doing correctly. Newer browsers have started to stop supporting height because it was never intended to be an attribute, I believe Netscape was at fault here. CSS will replace this method (currently the height css value, when set to 100%, tends to fail in some browsers as well).
All table attributes are listed here on this page:
http://www.w3schools.com/tags/tag_table.asp
You can also search this topic on the w3c page.
jlogin
Nov 24, 2004, 06:47 PM
Height is not a true attribute. Safari and other browsers that are ignoring it are doing correctly. Newer browsers have started to stop supporting height because it was never intended to be an attribute, I believe Netscape was at fault here. CSS will replace this method (currently the height css value, when set to 100%, tends to fail in some browsers as well).
All table attributes are listed here on this page:
http://www.w3schools.com/tags/tag_table.asp
You can also search this topic on the w3c page.
Zim,
I'm talking about the the height on the TD tag, not the Table Tag.
http://www.w3schools.com/tags/tag_td.asp. The root of my problem is the TD not expanding correctly. If you need further clarification, then take the code snippit I provided and view it with safari.
zim
Nov 24, 2004, 07:03 PM
Zim,
I'm talking about the the height on the TD tag, not the Table Tag.
http://www.w3schools.com/tags/tag_td.asp. The root of my problem is the TD not expanding correctly. If you need further clarification, then take the code snippit I provided and view it with safari.
Yes the td tag does have a height attribute However, the td attribute is depreciated in html 4.01 and should be avoided. At some point the height tag will be obsolete and css will be the only solution.
See the comment on the top of the w3schools page regarding the td (http://www.w3schools.com/tags/tag_td.asp) tag ;)
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.