How to add active class to link which is loaded via views and links comes from content type
Example:

In my content type I added a link field called "link", so the machine name is field_link

In this link field for url I put http://example.com/node/3

I created a View called "Test". 

In fields I added link.

In fields I added link again, but this time I change the formatter to URL, as plain text



We are going to use template_preprocess_views_view_fields 

In your theme's template.php file you add

function mytheme_preprocess_views_view_fields($vars){

  if ($vars['view']-&gt;name == "test"){

    $field_link = strip_tags($vars['fields']['field_link_1']-&gt;content); // use strip_tags function to remove HTML markup.
    $field_link = str_replace('http://', '', $field_link); // remove http://
    $field_link = str_replace('www.', '', $field_link); // remove www.

    $node_url = $_SERVER['SERVER_NAME'] . '/' . request_path(); // see https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/request_path/7.x

    if ($field_link == $node_url){

      $vars['fields']['field_link']-&gt;content = '&lt;div class="active-link"&gt;' . $vars['fields']['field_link']-&gt;content . '&lt;/div&gt;';

    }

    $vars['fields']['field_link_1']-&gt;content = null; // hides the field_link_1 field

  }

}



replace mytheme with the actual name of your theme.
replace test with the actual name of your view.
replace field_link with the actual name of your field.


Then you add the CSS to your theme's style.css file, Example:

.active-link a { color: green; }