Problem mixing divs with table tags

Greetings,
I'm trying to understand why I cannot output embedded ruby content
between div tags:

I have a div which I'm setting from a template and ruby code creating a
table rows:

<div id='line_items'>
  <% @packing_slip.packing_items.each_with_index do |@item, i| %>
      <tr class='altRow'>
        <td align="center"><%= (i + 1) %></td>
        <div id='track' style='display:none;'>
        <%= text_field "tracking_number", @item.tracking_number %>
        </div>
      </tr>
   <% end %>
</div>

When I view the selection source (ff 2.0 is neato!), line_items does
not contain the table rows:

    <div id="line_items">

      </div><tr class="altRow">
        <td align="center">1</td>
        <div id="track" style="display: none;">
        <input size="30" name="tracking_number[]" id="tracking_number_"
type="text">

        </div>
      </tr>

      <tr class="altRow">
        <td align="center">2</td>
        <div id="track" style="display: none;">
        <input size="30" name="tracking_number[]" id="tracking_number_"
type="text">
        </div>
      </tr>

I thought perhaps it has something to do with embedding the code within
a remote_form_for and changed that to a form_for. Same thing. I know
that using only divs, without table tags, does wrap the field:

<div id="line_items">
<% @packing_slip.packing_items.each_with_index do |@item, i| %>
        <div id='track' style='display:none;'>
        <%= text_field "tracking_number", @item.tracking_number %>
        </div>
   <% end %>
</div>

<table width="100%">
  <thead>
  </thead>
  <tbody>
      <tr class="altRow">
        <th>Item</th>
        <th>RMA # </th>
        <th>Part # </th>

        <th>Description</th>
        <th>Qty</th>
        <th>Serial # </th>
        <th>Tracking # </th>
      </tr>
    <div id="line_items">

        <div style="display: none;" id="track">

        <input size="30" name="tracking_number[]" id="tracking_number_"
type="text">
        </div>

        <div style="display: none;" id="track">
        <input size="30" name="tracking_number[]" id="tracking_number_"
type="text">
        </div>

    </div>
  </tbody>
</table>

However, I'd rather not sacrifice the table layout at this time. Any
thoughts are greatly appreciated!

Regards,
Dave

Thanks Keynan. I thought it would be possible to use both together. I
will avoid doing that. -Dave