You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#105371 Creating a hover hyperlink colour

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by KiwiBa on Friday, 25 September 2020 20:30 BST

KiwiBa
How does one create a hover colour for a link in JCE Editor. Bearing in mind I am not a coder. This is how is currently looks for the link.
href="https://www.psychologytoday.com/intl/blog/what-mentally-strong-people-dont-do/201710/how-train-your-brain-think-differently" target="_blank" rel="noopener" style="color: #ffffff;">Psychology Today</a></span></p>
<p> </p>

If it is Html what would I insert? I played around with the Hover property but it didn't work. Is there a setting in JCE that I can use instead of Html?

Ryan
Ideally this would be done via some css in your template styleshet, which leads me to the question - Are you wanting to apply the hover to all links, or just a particular one?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

KiwiBa
I should have mentioned I am using Joomla and Helix Ultimate with Sp Page Builder.
In Helix and SP Page builder I can normally set this as options. However, this particular blurb is sitting in an article using JCE editor.
It seems to not pick up the general settings for hovers from Helix and Sp Page builder. Hence me trying to see if I can do it in the HTML code for the article. But not being a coder I am getting much success.

So you answer your question I am wanting to apply it to just this one.

Ryan
There are 2 ways to do this, although both will require you to add a css rule to your template stylesheet. The first would use a class for the css rule to target any link that has the class applied. So when you create or update the link, you add the Class in the Advanced tab of the link dialog. This would allow it to be used for any other link you create too. The css rule might look something like this:

a.link_hover:hover {
    color: red;
    text-decoration: underline;
}
When you create or update the link, you would then select the link_over Class in the Advanced tab. Alternatively, you can target this specific link with a css rule like this:

a[href="https://www.psychologytoday.com/intl/blog/what-mentally-strong-people-dont-do/201710/how-train-your-brain-think-differently"]:hover {
    color: red;
    text-decoration: underline;
}
You would not need to apply this to the link when you create it.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

KiwiBa
Thanks Ryan. I will try this over the next few days. Just on my way to the airport.