Reputation: 39108
I just noticed that I get the following warning/error from VS.
Validation (XHTML 1.0 Transitional): Element 'td' cannot be nested within element 'table'
I dare to claim that the element TD can too be nested inside TABLE. In fact, I say that it's the only correct way to use TD. What am I missing?
I've double and triple checked - no TD is nested inside any other TD. They're just inside TR which is inside TABLE.
<table>
<td></td>
@foreach (String t in ts)
{ <td>@t</td> }
@foreach (String s in ss)
{
<tr>
<td>...</td>
@foreach (String t in ts)
{ <td>...</td> }
</tr>
}
</table>
Upvotes: 4
Views: 10124
Reputation: 38860
The error suggests you are trying to do this:
<table>
<td>...</td>
...
but td
s must be nested in tr
s like this:
<table>
<tr>
<td>...</td>
</tr>
...
If you are already doing this, then you will need to show the HTML. Without seeing the HTML we can only guess...
Upvotes: 11
Reputation: 2577
The warning suggest that you have the td immediatly in table. td can be only withing tr tag
Upvotes: 2