How to change design in comments list I am listing all the comments in a page.

For example, suppose the comments are listed using a design similar to the following one:


  Comment Title 1 
  
  Comment Description 1
  
  
  
  Comment Title 2
  
  Comment Description 2
  
  
  
  Comment Title 3
  
  Comment Description 3
  
  


If the third comment is the last comment, I should not print the line for that comment.

How can this be done?
EDIT: Updated to use a preprocess function.  This still might not be pretty, but works fine.  In your template.php file in your theme, add this function (replacing YOURTHEME with the name of your current theme):

function YOURTHEME_preprocess_comment(&amp;$variables) {
  $display_order = _comment_get_display_setting('sort', $variables['node']);
  if ($display_order == 1) {
    $variables['end_comment'] = db_result(db_query('SELECT MIN(cid) AS cid FROM {comments} WHERE status = 0 AND pid = 0 AND nid = %d', $variables['node']-&gt;nid));
  }
  else if ($display_order == 2) {
    $variables['end_comment'] = db_result(db_query('SELECT MAX(cid) AS cid FROM {comments} WHERE status = 0 AND pid = 0 AND nid = %d', $variables['node']-&gt;nid));
  }
}


Now copy comment.tpl.php from modules/comment and place it in your theme folder.  Add this code

print $end_comment == $comment-&gt;cid ? ' last' : '';


to the class area of the div html.  It should look something like:

&lt;div class="comment&lt;?php print ($comment-&gt;new) ? ' comment-new' : ''; print ' '. $status; print $end_comment == $comment-&gt;cid ? ' last' : ''; ?&gt; clear-block"&gt;


You now have a class of last on the bottom comment, no matter which way they are sorted.  Now simply add some simple CSS to your stylesheet:

div.comment.last {
  border-bottom: none;
}




You can also use jQuery or CSS to remove the bottom border from the last comment, but they are less reliable depending on a user's browser, browser settings, etc.

jQuery:  

// Remove border from last comment
$('#comments div.comment:last').css('borderBottom', 'none');


CSS (Works in IE9, but unfortunately will not work with IE8 and below):  

div.comment:last-child {
  border-bottom: none;
}