Need Help with CSS to Change Text Color on Hover | XM Community
Skip to main content
Solved

Need Help with CSS to Change Text Color on Hover

  • December 15, 2024
  • 2 replies
  • 66 views

Forum|alt.badge.img+9

Hi everyone,

I'm working on a survey and in an answer option I do have a hyperlink. When I hover over the option, I want all the text, including hyperlinks, to change to white. However, I'm having trouble getting the CSS to work correctly.

Here's an example of my HTML structure:

 

<b>Option Text <a href="link" target="_blank">htext</a></b><br> <span style="font-size: 11px">additional text</span>

.choice.radio:hover a { color: white; /* Ensure link text color also changes to white */ }

Due to the trial version, I cannot show the full functionality. When I hover over the option, all the Option Text becomes white, the htext becomes light blue, and the background becomes dark blue.

Could anyone help me with the correct CSS to ensure all text, including hyperlinks, changes to white on hover?

I've also added a screenshot from the trial login to make more sense to the users.

Thanks in advance!

 

Best answer by Deepak

@Vinoth_Mathaiyan 

Try this

.Skin .SAVR label.SingleAnswer:hover,
.Skin .SAVR label.SingleAnswer:hover a {
    color: white;
}

 

View original

2 replies

Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+44
  • 1549 replies
  • Answer
  • December 16, 2024

@Vinoth_Mathaiyan 

Try this

.Skin .SAVR label.SingleAnswer:hover,
.Skin .SAVR label.SingleAnswer:hover a {
    color: white;
}

 


Forum|alt.badge.img+9

Thank you, ​@Deepak 


Leave a Reply