Dark Ambient wrote:> This might be off topic, not entirely sure. Basically I''ve
created a
> table to return data and it seems that the column headings repeat
> along with the entries. So perhaps it''s where I''m placing
the code and
> not so much my HTML.
>
> Ideas, solutions appreciated:
>
> <h1> Current job openings</h1>
> <% for position in @positions -%>
> <div id="itsthetable">
> <table summary="MyCompany">
> <caption>Current postings</caption>
> <thead>
> <tr>
> <th scope="col">Custom ID</th>
> <th scope="col">Company</th>
> <th scope="col">First entered</th>
> <th scope="col">Started on</th>
> <th scope="col">Post length</th>
> <th scope="col">Days left</th>
> <th scope="col">Category</th>
> <th scope="col">City</th>
> <th scope="col">State</th>
> <th scope="col">PayType</th>
> <th scope="col">Exp reqd</th>
> </tr>
> </thead>
> <tfoot>
> </tfoot>
> <tbody>
> <tr >
> <td><%= position.company_job_id %></td>
> <td><%= position.comapny_id %></td>
> <td><%= position.entered_on_date.strftime("%m/%d/%Y")
%></td>
> <td><%= position.start_on_date.strftime("%m/%d/%Y")
%></td>
> <td><%= position.display_length %></td>
> <td><%= position.days_left %></td>
> <td><%= position.category_id %></td>
> <td><%= position.city %></td>
> <td><%= position.state.name %></td>
> <td><%= position.ann_or_hrly %></td>
> <td><%= position.exp_reqs_id %></td>
> </tr>
> </tbody>
> </table>
> </div>
> <% end %>
Your for loop should just be around the <tr>...</tr>.
You want one div, one table, and many rows.
regards
Justin