Site logo

Archived topic

Customize the underlined text

26 replies · Started by Sebastián on June 23, 2019

Viewing posts 16–27 of 27

No problem :)

Hi Leo,

In your reply #938961, where do I replace it?
Otherwise, is there a way that I can avoid doing it manually (i.e. avoid <u> and use the default underline option) while styling with different color?

Thanks

Hi David

I am able to get the desired style. But I'm saying I need to edit the html and add <u> </u> to achieve that.

I want to achieve the style by just clicking the underline button in the text editor. Without the need to go into html.

P.s. Clicking the underline button in the editor creates html like <span style=text decortation:underline>

Further to my reply above - I already put the css in, and it works. Its just it is related to the <u> class, which does not appear to be what the underline button in wordpress editor uses.

Ok - so <u> is deprecated any how. Annoying that WP used a span without adding a class.
However you can try this:

span[style*="underline"] {
    text-decoration: none !important;
    border-bottom: 4px solid #f00;
}

This will target any span that has the underline value inline - remove that and replace it with a border style that you can change to suit.

Hey! This is the code i'm using right now and works well:

strong {
    box-shadow:inset 0 -7px 0 0 #E22943;
}

Is it possible to set degraded colours in the underline instead of a solid colour? I've currently change the branding of my website https://nichoseo.com/ and I would like to replicate the colours used in the logo but in the underline for all the blog posts links.

Let me know if it's clear enough.

Hi there,

you could try this:

strong {
    position: relative;
}
strong:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, rgba(131,58,180,1) 0%, rgba(253,29,29,1) 50%, rgba(252,176,69,1) 100%);
}

And this site is great for generating the line-gradient property;

https://cssgradient.io

I'm so happy to see that it worked. Thank you so much. Just in case, I want to do the same but with the buttons, but I'm using Elementor for them. By any chance do you know how to do it there?

Might be best to check with Elementor, not sure if thats an option - all i can offer is some CSS to overwrite its colors:

.elementor-widget-button .elementor-button {
    background: linear-gradient(90deg, rgba(131,58,180,1) 0%, rgba(253,29,29,1) 50%, rgba(252,176,69,1) 100%) !important;
}
/* Separate hover color */
.elementor-widget-button .elementor-button:hover {
    background: linear-gradient(90deg, rgba(131,58,180,1) 0%, rgba(253,29,29,1) 50%, rgba(252,176,69,1) 100%) !important;
}

Thanks. Will try it.

You're welcome

This archived topic is closed to new replies.