Html_table

liunx

Guest
Hallo, <br />
<br />
I have an html table which contains nested tables in its cells.<br />
My problem is that the height of each row of the outer table is determined by the height of the cell that contains the biggest nested table.As a result some cells of this row contain nested tables whose size is smaller than the cell they are contained in. Is there a way to make all nested tables fit exactly the space available in the cell they are contained?I tried the height="100" attr in the td tag containing the nested table and it worked, but it enlarged the outer table to fit the extents of the browser?Any ideas?<br />
<br />
Regards <br />
Manousos, Athens<!--content-->Solution: quit using nested tables. What do you want to do, give us a big picture. You can most likely acheive it better with css. If you are using a table based layout and these nested tables are part of it you definatly need to stop. Nested tables are wasting your bandwidth, and are inaccessible. Also the nature of the table is to stretch and this can make them hard to control sometimes depending on what you are trying to do, you can't make a table not stretch, its what they are intended to do.<!--content-->Hallo,<br />
<br />
I am trying to create an html table from an xml doc using XSLT.The xml looks like this.<br />
<br />
<CadData><br />
<Polygon id="1"><br />
<PolygonsProperty Prop_ID="842952"> <br />
<Owner Owner_ID="566626" Name="Karkanis Peter"/><br />
</PolygonsProperty><br />
<PolygonsProperty Prop_ID="842953" <br />
<Owner Owner_ID="566620" Name="Nasou Jane"/><br />
<Owner Owner_ID="566630" Name="Tennison Mark"/><br />
</PolygonsProperty><br />
</Polygon><br />
</CadData><br />
<br />
<xsl:template match="Polygon"><br />
<html><br />
<title>OWNERSHIP</title><br />
<body bgcolor="#FFFFCC"><br />
<h3>KAEK <xsl:value-of select="@id"/></h3><br />
<table border="1"><br />
<tr><br />
<th bgcolor="#9acd32" align="left">PROPERTY_CODE</th><br />
<th bgcolor="#9acd32" align="left">OWNER_CODE</th><br />
<th bgcolor="#9acd32" align="left">NAME</th><br />
</tr><br />
<xsl:for-each select="PolygonsProperty"><br />
<tr><br />
<td align="center"><br />
<xsl:value-of select="@PROP_ID"/><br />
</td><br />
<td align="center"><br />
<table border="1" width="100%"><br />
<xsl:for-each select="Owner"><br />
<tr><br />
<td align="center"><br />
<xsl:value-of select="@Owner_ID"/><br />
</td><br />
</tr><br />
</xsl:for-each><br />
</table><br />
</td><br />
<td align="center"><br />
<table border="1" width="100%"><br />
<xsl:for-each select="Owner"><br />
<tr><br />
<td align="center"><br />
<xsl:value-of select="@Name"/><br />
</td><br />
</tr><br />
</xsl:for-each><br />
</table><br />
</td><br />
</tr><br />
</xsl:for-each><br />
</table><br />
</body><br />
</html><br />
</xsl:template><br />
</xsl:stylesheet><br />
<br />
The table i want to create has three columns PROPERTY_CODE, OWNER_CODE, NAME and because <br />
the second PolygonsProperty PROP_ID="842953" corresponds to two Owners OWNER_ID="566620"<br />
and OWNER_ID="566630", i want the second row to span so that it includes two cells<br />
of OWNER_ID.This is why i create nested tables for the cells OWNER_CODE and NAME.<br />
Everything works fine except for that the two nested tables each one of which has just two <br />
rows are of differrent size.I mean the rows due to the fact that contain diferrent<br />
amount of data, for example the name of each owner is much longer that the OWner_id,<br />
are of differrent height.Is there a way to make the nested tables match the <br />
extends of the cells of the outer table that contain them.I tried adding the Height <br />
attribute in each nested table and assigning the value of 100.This worked but all <br />
got much bigger in order to occupy the 100% of the available space.<br />
<br />
Because i am using xslt i can add a row which spans to more rows but how am i going <br />
to add more rows in the specific row at the specific cells?<br />
<br />
<br />
Regards<br />
Manousos, Athens<!--content-->why not use colspan and rowspan?<!--content-->
 
Back
Top