Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table rows don't line up

Status
Not open for further replies.

ResolutionsNET

IS-IT--Management
Jul 31, 2000
70
GB
Hi,

In the following code I can't seem to get the two table rows to line up correctly, can anyone point me in the correct direction.

<table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr nowrap=&quot;&quot;>
<td nowrap=&quot;&quot;>
<table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td nowrap=&quot;&quot;>
<table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td nowrap=&quot;&quot;> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td nowrap=&quot;&quot;>Good</td>
</tr>
<tr>
<td nowrap=&quot;&quot;>Outstanding</td>
</tr>
<tr>
<td nowrap=&quot;&quot;>Poor</td>
</tr>
<tr>
<td nowrap=&quot;&quot;>Very Good</td>
</tr>
<tr>
<td nowrap=&quot;&quot;>Very Poor</td>
</tr>
</table>
</td>

<td nowrap=&quot;&quot;>
<table border=&quot;0&quot; cellspacing=&quot;0&quot; cellspaing=&quot;0&quot;>
<tr>
<td></td>
</tr>
<tr>
<td nowrap=&quot;&quot;>Question Count</td>
</tr>
<tr>
<td>3,636</td>
</tr>
<tr>
<td>3,837</td>
</tr>
<tr>
<td>553</td>
</tr>
<tr>
<td>12,335</td>
</tr>
<tr>
<td>193</td>
</tr>
</table>
</td>
</tr>
</table>
 
Hi mate, instead of leaving the table's cell empty or just a space, use the non-breaking-space code (nbsp, type it properly).
See line 9 and 34 of your table.
Hope this helps.
mansii
 
2 things right off the bat:

1. nowrap takes no value so I believe you just want <td nowrap>
2. you are nesting way too much for what you are wanting to produce... I mean you a table in there that has nothing in it... I am guessing you did it in frontpage or dw or something like that.... I would just do something like:

<table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td nowrap>&nbsp;</td>
<td>Question Count</td>
</tr>
<tr>
<td nowrap>Good</td>
<td>3,636</td>
</tr>
<tr>
<td nowrap>Outstanding</td>
<td>3,837</td>
</tr>
<tr>
<td nowrap>Poor</td>
<td>553</td>
</tr>
<tr>
<td nowrap>Very Good</td>
<td>12,335</td>
</tr>
<tr>
<td nowrap>Very Poor</td>
<td>193</td>
</tr>
</table>
 
In addition, I guess this is your main problem, I looked back to your codes and found that you are placing two tables inside one cell. By default, perhaps, the content of one cell is center-aligned vertically (whew...). So, set the table's cell content to top-aligned. Line 3 should be:
<td nowrap valign=&quot;top&quot;>

Besides, if you wanna see how it affects your codes, try to set the table border to 1.

Good luck.
mansii
 
Thanks guys,

This has pointed me in the right direction. The table code is actually generated from a transfromed set of OLAP XML. It's provided be microsoft, it wasn't standard to I started to play with it. Now it's working correctly. Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top