I really hope you can help me out with this issue. I have managed to pull the picture from my database into the product description, but the picture displayed is way too big and I would like to resize it, but whatever I try it doesn`t include the image to the class.
That`s my index.html.rb
<% @homes.each do |home| %>
<tr>
<td width="130px"><%= home.name %></td>
<td class="image"><%= image_tag "/"+home.images[0].image_path %></td>
<td width="300px"><%= home.details %></td>
</tr>
CSS
.image
{
background: yellow;
width: 200px;
}
I set the background color to check if the image class is linked correctly and that works fine. I can see the yellow background changing the size, but the picture lies above that class and is completely unimpressed by what I am trying.
I also tried the below instead of the image class with the result that only a little "img_not_found" icon was displayed followed by " height=80px />.
<td width="200px"><img src="<%= image_tag '/'+home.images[0].image_path %>" height=80px /></td>
Does anybody know where I made the mistake?
Many thanks in advance.