Joomla Icon Logo

Written by me@grafxflow

11 Sep, 2012



Changing a Joomla email link cloaking CSS color

Joomla has by default a plugin called Email Cloaking which replaces any email on the content with javascript to stop spam. I have noticed this brings one problem with regards to changing the hyperlinks colour.

At first the easy way is to add the following to the css:

a:link, a:visited {
   color: #FF0000; /* Red colour */

This works fine across the whole website but what if you wanted to give the hyperlinks different colours. Maybe giving the hyperlinks their own CSS class like...

<p>Here is the link <a class="email_color" href="#"></a></p>

... but NO the CSS class gets deleted by the plugin.

The best way I have found is to add the class to the paragraph tag that contains the email, so you get the following:

<p class="para_email_color" >Here is the link <a href="#"></a></p>
.para_email_color a:link, .para_email_color a:visited {
   color: #FF0000; /* Red colour */

Add comment

Smart Search

131 Following


Hull, United Kingdom

I am a Full-stack Developer who also started delving into the world of UX/UI Design a few years back. I blog and tweet to hopefully share a little bit of knowledge that can help others around the web. Thanks for stopping by!