View of taxonomy terms - add preprocess class
You should try hook_views_pre_render(&amp;$view);
http://api.drupal.org/api/views/views.api.php/function/hook_views_pre_render/7

Also you can write a template file to write extra css class with condtion. For this go to advance section and go for theming section and choose a template name.