Change Text Underline Color

Hello,

I am wanting to change the underline of text on my site.
I found the following article that pointed me in the right direction, however it didn’t work as expected.
I just want to change the color of the underline on regular text.
Please note that in the post linked below, the site has changed (just remove"new." and it works fine.)

Site info in Secure Note

Hi There,

Please follow these steps:

  • Add the text-underline class to your text element:

  • After that add this custom CSS:
.x-text.text-underline h1 {
    position: relative;
}
.x-text.text-underline h1::after {
    content: '';
    position: absolute;
    width: 300px;
    bottom: 8px;
    background-color: #1e73be;
    background: #1e73be;
    background: -webkit-linear-gradient(left, #1e73be 30%, #ffffff 100%);
    background: linear-gradient(left, #1e73be 30%, #ffffff 100%);
    height: 8px;
    left: 50%;
    transform: translateX(-50%);

}

You can create your own background gradient from this link: https://www.cssmatic.com/gradient-generator/

Hope it helps :slight_smile:

You are AWESOME!
Worked perfectly.
(Although I just wanted the regular underline to change color. This adds a separate line under the underline. I will use what you have provided here and remove the text underline.)
Thank you so much.

I have another issue with a lightbox on mobile, but will open a separate ticket for it.

Thx again!

You’re most welcome and yes, please open a new ticket. Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.