I’m trying to simply have a table appear inside a <td> element of an outer table. This code:
<table border="0" cellspacing="5" cellpadding="5">
<tr>
<td>
<table border="0" class="timesList">
<tbody>
<% @time_array.each do |time| %>
<tr><%= time %></tr>
<% end %>
</tbody>
</table>
</td>
</tr>
However, when erb renders the html for this page, I get:
<table border="0" cellspacing="5" cellpadding="5">
<tr>
<td>
9:0010:00:11:0012:00
<table border="0" class="timesList">
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
</table>
</td>
</tr>
Does anyone have an idea how to fix this? I am just missing something blatantly obvious? Thanks!
I think it’s because the
<td></td>are missingYour browser failed to parse the table and put the unexpected text “9:0010:00:11:0012:00” outside the table when rendering the source.