Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Changing the text decoration style

Explorer ,
Jun 02, 2025 Jun 02, 2025

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

390
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jun 04, 2025 Jun 04, 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.
Translate
Community Expert ,
Jun 03, 2025 Jun 03, 2025

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 04, 2025 Jun 04, 2025
LATEST

Thanks Jeff. Your suggestion overcomes the problem.

Chers

Geoffrey

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 04, 2025 Jun 04, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 04, 2025 Jun 04, 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 04, 2025 Jun 04, 2025

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

Cheers

Geoffrey

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp