diff --git a/elements.theme.inc b/elements.theme.inc
index 26c55dd..d90521b 100644
--- a/elements.theme.inc
+++ b/elements.theme.inc
@@ -50,15 +50,16 @@ function theme_tableselect($element) {
 
       // Render the checkbox / radio element.
       $element[$key]['#printed'] = NULL;  // Drupal 6 only
-      $row['data'][] = drupal_render($element[$key]);
+      $row['data'][] = array('data' => drupal_render($element[$key]), 'class' => 'column_select');
 
       // As theme_table only maps header and row columns by order, create the
       // correct order by iterating over the header fields.
       foreach ($element['#header'] as $fieldname => $title) {
-        $row['data'][] = $element['#options'][$key][$fieldname];
+        $row['data'][] = array('data' => $element['#options'][$key][$fieldname], 'class' => 'column_'. $fieldname);
       }
       $rows[] = $row;
     }
+    debuglog($rows);
     // Add an empty header or a "Select all" checkbox to provide room for the
     // checkboxes/radios in the first table column.
     if ($element['#js_select']) {
@@ -92,7 +93,18 @@ function theme_tableselect($element) {
     ));
   }
 
-  return theme('table', $header, $rows, $element['#attributes']);
+  // add 'class' attributes to each header column
+  $new_header = array();
+  foreach ($header as $index => $header_column) {
+    if (!is_array($header_column)) {
+      $header_column = array('data' => $header_column);
+    }
+    $header_class = (isset($header_column['class'])) ? ($header_column['class'] .' ') : '';
+    $header_class .= 'column_'. $index;
+    $header_column['class'] = $header_class;
+    $new_header[$index] = $header_column;
+  }
+  return theme('table', $new_header, $rows, $element['#attributes']);
 }
 
 /**
