0

モデル用のテーブルを作成しようとしていますが、その外観が気に入りません。インターネット上の例は正常に見えますが、私のものには視覚的な問題があります。私のindex.html.erbは

<table class="pretty">  
  <tr>  
    <th><%= sortable "name" %></th>
    <th><%= sortable "city" %></th>
    <th><%= sortable "country" %></th>
    <th><%= sortable "street_address" %></th>
    <th><%= sortable "sector" %></th>
    <th><%= sortable "telephone" %></th>
    <th><%= sortable "fax" %></th>
  </tr>  

  <% for company in @companies %>  
  <tr>  
    <td><%= company.name %></td>
    <td><%= company.city %></td>
    <td><%= company.country %></td>
    <td><%= company.street_address %></td>
    <td><%= company.sector %></td>
    <td><%= company.telephone %></td>
    <td><%= company.fax %></td>
  </tr>
  <% end %>
</table>

次のようになります。

私は次のようになります。

4

1 に答える 1

0

私はこれをいくつかの基本的な方法で行いました。テーブルの行を次のように変更しました。

<table class="pretty" border="1" cellpadding="10">
于 2013-08-29T13:27:22.407 に答える