Skip to main content
Participant
November 30, 2022
Question

Epub_Export_Hyperlinks_Underline

  • November 30, 2022
  • 3 replies
  • 915 views

Hi Guys. Im trying to figure out how can i change hyperlinks. I can change colour and size but i cant refuse the underline than i export to epub. Thanks for any kind of advice. Cheers 

This topic has been closed for replies.

3 replies

Community Expert
January 31, 2023

@James Gifford—NitroPress said: "You can apply all styling in ID and using CSS, but the reader has the final say."

 

Hi James,

indeed. The reader has the final say.

Usually text-decoration:none in the CSS should be sufficient.

 

But even if I see that already in the CSS of a cracked open reflowable EPUB the Thorium Reader or the Calibre ebook viewer will still do an underline.

 

So I did the following, I changed span.Hyperlink in the idGeneratedStyles.css from:

 

span.Hyperlink {
	color:#22599b;
}

 

to:

 

span.Hyperlink {
	color:#22599b;
	text-decoration:underline;
	text-decoration-color:rgb(255,255,255);
}

 

Well, that's a hack only, a white underline that is working with a white background.

The white underline will be visible if I change the viewer's theme from "Neutral" to e.g. "Night".

 

James, do you have an idea to turn it off in the EPUB viewer?

 

Regards,
Uwe Laubender
( Adobe Community Expert )

James Gifford—NitroPress
Legend
January 31, 2023

As you note I noted 🙂 it's all in the reader. Some are very "soft" and follow the code; others have very hard-coded highlighting or style.

 

Overriding both the default Hyperlink style (which plays hide and seek within ID anyway) and any overlay style sometimes combines to give some control. Often, the one factor that just cannot be removed is the underline, and second to that is that it will always be a blue underline, even under otherwise restyled code.

 

Peter Kahrel
Community Expert
Community Expert
November 30, 2022

If you disabled underline in the character style and the character style is applied to the hyperlinks and the hyperlinks are underlined, then the underline must somehow have been applied as a local override. You can undo that by searching for the character style, and removing the underline (i.e. apply -underline):

 

 

Peter Kahrel
Community Expert
Community Expert
November 30, 2022

Hyperlinks are applied a character style called Hyperlink by default. Disable underline in that character style and all links will be fixed.

TomWallAuthor
Participant
November 30, 2022

Thanks for the very quick response. But like im wrote, i did changed the caracter style. It worked perfect for colour and size but it do not working for refusing the underline.
btw: it seems to work with the ebook reeder from apple but its not working for google and the readerfrom acrobat