Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 04-10-2017, 10:53 AM   #1
franckv
Junior Member
franckv began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: none
hyperlink CSS for KF8

Hi,

I try to customize the way an hyperlink is displayed on Kindle/iOS.
So far after googling and browsing this forum I can't find any solution. Furthermore, the behavior is very bizarre. For example:
Code:
 
<p><a style="text-decoration: none;" href="XXXX">This link should NOT be underlined (page doesn't exist).</a></p>
<p><a style="text-decoration: none;" href="IExist.xhtml">This link should NOT be underlined. (page exists)</a></p>
This only works when the linked page doesn't exist!

Is there a way to change an hyperlink's style at all?
franckv is offline   Reply With Quote
Advert
Old 04-10-2017, 02:31 PM   #2
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,069
Karma: 480516
Join Date: Dec 2012
Device: Kindle
If you have no underlining, how does the reader know it's a hotlink?
Notjohn is offline   Reply With Quote
Old 04-10-2017, 02:45 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 48,557
Karma: 39003673
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by Notjohn View Post
If you have no underlining, how does the reader know it's a hotlink?
It's a new puzzle book called Hunt the Hyperlink.
JSWolf is offline   Reply With Quote
Old 04-11-2017, 11:59 AM   #4
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 80,522
Karma: 73099505
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Pro 10.5", iPhone 6
Quite a common requirement for such things as footnote references or an inline TOC.
HarryT is offline   Reply With Quote
Old 04-11-2017, 12:21 PM   #5
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 1,529
Karma: 12179915
Join Date: Nov 2011
Location: Florida
Device: iPad Air 2, Kindle PW2, Nexus 7, Fire 5th Gen
As far as I can tell, hyperlinks are always underlined in Kindle readers/apps as an aid to the consumer, despite any HTML styling to the contrary.

The only reason that the hyperlink with a bad target is not underlined is that kindlegen removes bad links, so that case isn't being treated as a hyperlink by the reading software.
jhowell is offline   Reply With Quote
Old 04-12-2017, 03:36 AM   #6
fbrzvnrnd
Addict
fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.
 
Posts: 269
Karma: 190694
Join Date: Feb 2009
Device: iLiad
There is a tag to have hyperlinks without underline, if this is what you need.
fbrzvnrnd is offline   Reply With Quote
Old 04-12-2017, 04:23 AM   #7
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 80,522
Karma: 73099505
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Pro 10.5", iPhone 6
Are you going to tell us what it is, or do we have to guess?
HarryT is offline   Reply With Quote
Old 04-12-2017, 02:39 PM   #8
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 1,529
Karma: 12179915
Join Date: Nov 2011
Location: Florida
Device: iPad Air 2, Kindle PW2, Nexus 7, Fire 5th Gen
I did some more research and testing and the following does appear to be effective for removing the underline on links for the MOBI, KF8, and AZK formats. (Placing the same style with !important in CSS doesn't seem to be as effective in some cases.)

<p><a href="xxx.html" style="text-decoration: none !important;"><mbp:nu>This link should NOT be underlined.</mbp:nu></a></p>

It still doesn't work for KFX though.
jhowell is offline   Reply With Quote
Old 04-13-2017, 07:19 AM   #9
fbrzvnrnd
Addict
fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.fbrzvnrnd can program the VCR without an owner's manual.
 
Posts: 269
Karma: 190694
Join Date: Feb 2009
Device: iLiad
Quote:
Originally Posted by HarryT View Post
Are you going to tell us what it is, or do we have to guess?

Sorry, I was on a different computer without ebook library archive on and I did not remember the tag name.

I can confirm the mbp:bu

Code:
<p id="v1114"><a style="text-decoration: none !important;" href="../Text/Section0015_0011.xhtml#ve1114"><mbp:nu>it doesn’t matter leaving gregory peck</mbp:nu></a></p>
We used it in a italian/english ebook where each verse is linked to the same verse in opposite language.
fbrzvnrnd is offline   Reply With Quote
Old 04-18-2017, 12:30 PM   #10
franckv
Junior Member
franckv began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: none
Thanks all for your answers.

I have two use cases for which I don't want to underline hyperlinks. The first one is to link to a word's translation (it's common for books to use bold characters only) and the second one is when all the words in a section are hyperlinks (the reader knows about it), having underlines is awful then.

The trick with <mbp:nu> works either with an inline style or a class, at least for Kindle on iOS.
franckv is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle for iOS not supporting all CSS/KF8 features? Oxford-eBooks Amazon Kindle 6 01-14-2014 04:33 AM
KF8 max-width HTML CSS tag broken? ekovv Kindle Formats 5 09-05-2012 04:57 AM
Content KF8 only or combined KF8/Mobi JSWolf Amazon Kindle 9 06-03-2012 09:11 PM
Hyperlink adachim Kobo Reader 0 11-02-2010 10:57 PM
Hyperlink? fcoulter Sigil 3 03-28-2010 10:31 AM


All times are GMT -4. The time now is 01:03 PM.


MobileRead.com is a privately owned, operated and funded community.