Skip to main content
Inspiring
June 2, 2025
Answered

Changing the text decoration style

  • June 2, 2025
  • 2 replies
  • 350 views

Hi

I'm trying to style text that triggers popups differently to text that triggers links (a dotted underline rather than the standard solid underline). The RH styles UI doesn't appear to give this option, so I've tried adding the following to the code:

<a href="myfile.htm"><span style="text-decoration-style: dotted;">Users</span></a>

Alas, the <a> style unexpectedly overrides the embedded <span> and the underline remains as a solid line.

Have I flubbed the coding ? Is this a deficiency in RH? Are there other tricks you can share?

TIA

Geoffrey

    Correct answer David Kinyon

    I was able to put it into the CSS as follows: 

    a.dotted {

       text-decoration-style: dotted;

    }

     

    And then in the source, it looks like:

    <a class="dotted" href="myfile.htm">Users</a>

     

    Using this method, you can apply it without needing to edit the XML source:

    1. Create your link the normal way.
    2. Select the linked text.
    3. In Content Properties > Attributes > Class, type dotted.

    2 replies

    Inspiring
    June 4, 2025

    Try this instead, it works for me (RH 2022.6.34, output tested in Chrome & Firefox):

    <a href="myfile.htm" style="text-decoration-style: dotted;">Users</a>

    I did not test putting this into the CSS, that would certainly be preferred, although given that it doesn't work in a span I wonder if it would work in a class.

    David KinyonCorrect answer
    Inspiring
    June 4, 2025

    I was able to put it into the CSS as follows: 

    a.dotted {

       text-decoration-style: dotted;

    }

     

    And then in the source, it looks like:

    <a class="dotted" href="myfile.htm">Users</a>

     

    Using this method, you can apply it without needing to edit the XML source:

    1. Create your link the normal way.
    2. Select the linked text.
    3. In Content Properties > Attributes > Class, type dotted.
    Inspiring
    June 4, 2025

    Thank you David. That's exactly what I wanted.

    Cheers

    Geoffrey

    Jeff_Coatsworth
    Community Expert
    Community Expert
    June 3, 2025

    Have you looked at doing this through the CSS instead of trying to style the HTML?

    Inspiring
    June 4, 2025

    Thanks Jeff. Your suggestion overcomes the problem.

    Chers

    Geoffrey