Give unique class to last item in view
You may try next code snippet
    

/**
 * @file
 * Default simple view template to display a list of rows.
 *
 * @ingroup views_templates
*/
end($rows);
$last = key($rows);
?&gt;
&lt;?php if (!empty($title)): ?&gt;
  &lt;h3&gt;&lt;?php print $title; ?&gt;&lt;/h3&gt;
&lt;?php endif; ?&gt;
&lt;?php foreach ($rows as $id =&gt; $row): ?&gt;
&lt;?php if ($id == $last): ?&gt;
    &lt;?php $classes_array[$id] .= ' last-element'; ?&gt;
&lt;?php endif; ?&gt;
  &lt;div&lt;?php if ($classes_array[$id]) { print ' class="' . $classes_array[$id] .'"';  } ?&gt;&gt;
    &lt;?php print $row; ?&gt;
  &lt;/div&gt;
&lt;?php endforeach; ?&gt;