How to add class to specific TD in view table? I have a view created /admin/structure/views and it is a table.

How do I add a class (f.ex. "bgred") for a specific TD (f.ex "title")
in this table without using JavaScript ? I mean I have some hidden field
(f.ex. "Status") and want to add class for field "Title" only when Status==1,
is this possible ?

I want to add class to TD element not some div inside TD...

&lt;td class="bgred"&gt;
1) click on desire field under 'Fields' in your view

2) select 'Style Settings' 

3) check 'Customize field HTML' checkbox

4) check 'Create a CSS class' checkbox

5) enter 'replace-this-class' in 'CSS class' text field


then you should look into hook_views_post_render - this where you can access the actual html output for each row. if you add a class to the field as described above, you will be able then do php find and replace based on any logic. 

my_module_views_post_render(&amp;$view, &amp;$output, &amp;$cache) {

    foreach ($view -&gt; result as $result) {

        //not sure about that - you would need to debug that
        $result_status = $result -&gt; status; 

        //your php logic and new class assignment
        if($result_status == 1) {
            $class = 'new-class';
        }

        //what you want to replace - again double check that
        $replace = '&lt;td class="replace-this-class';

        //alter `$output` variable
        $output = str_replace($replace, '&lt;td class="'. $class .'"', $output);

    }   

}


This is very ugly but it works. Of course you will need to look into the $output variable to make sure that you are targeting correct html.