Topic: Why is there a difference where I put the class="list-image" here:

Whats the difference between these two examples? In example 2 the image becomes much larger in the table than in example 1, I dont see why?


Example 1

      <td>
        <%= image_tag product.image_url, :class => 'list-image' %>
      </td>

Example 2
      <td class="list-image">
        <%= image_tag product.image_url %>
      </td>

CSS:
#product-list .list-image {
  width:        60px;
  height:       70px;
}

Re: Why is there a difference where I put the class="list-image" here:

In the first example, the class is applied to the image. In the second, the class is applied to the table cell.