Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-25-2019, 07:06 AM   #1
momoha
Annabelle Viau
momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.
 
momoha's Avatar
 
Posts: 43
Karma: 16664
Join Date: Jan 2015
Location: Rishikesh, India
Device: iPad, Kobo, Windows 10 (ADE, Azardi), Android (Google Books, Bluefire)
Question Custom link colour in .mobi?

Hi,

Is it possible to specify a custom colour for links in a .mobi ebook? In my ePubs I use the following CSS, but it isn’t working when I transfer to mobi. Also, with the latest version of Kindle Previewer, text-decoration: none; also doesn’t work anymore... Any workaround?

Code:
a {
	color: #A00000;
	-webkit-text-fill-color: #A00000;
	text-decoration: none;
}
Thanks!

Last edited by momoha; 02-25-2019 at 07:16 AM.
momoha is offline   Reply With Quote
Old 02-25-2019, 08:29 AM   #2
momoha
Annabelle Viau
momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.
 
momoha's Avatar
 
Posts: 43
Karma: 16664
Join Date: Jan 2015
Location: Rishikesh, India
Device: iPad, Kobo, Windows 10 (ADE, Azardi), Android (Google Books, Bluefire)
So I found a really weird workaround for the links colour, but still couldn’t solve the text-decoration problem.

For the links colour, the problem happens when I delete my Cover.xhtml. As it is specified in the Amazon guidelines that there shouldn’t be a html page for the cover, I just removed it in the spine, and now the links keep their custom colours.

This text-decoration thing still annoys me quite a lot so if anyone has a solution it would greatly help me...
momoha is offline   Reply With Quote
Old 02-25-2019, 08:43 AM   #3
jhowell
Grand Sorcerer
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: 7,073
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
To remove the text decoration on links I believe that you have to use:

Code:
text-decoration: none !important;
jhowell is offline   Reply With Quote
Old 02-25-2019, 11:03 AM   #4
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,772
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by momoha View Post
This text-decoration thing still annoys me quite a lot so if anyone has a solution it would greatly help me...
As you know Momoha, Amazon has three ebook formats: .mobi (the older one), .azw3/.kf8 and .kfx (the newest). I'm afraid of you can't disable the text decoration with .mobi and .azw3/.kf8 formats. It could be possible with .kfx but the old Kindle models don't support it, so in those device you only could deal with .mobi and .azw3/.kf8. IMHO you can't do anything to handle that "issue". Maybe Hitch (the specialist in the Amazon's formats in this forum and she knows a lot about Kindle) can tell you something different but in this case I doubt it.

EDIT: I don't think it's a good idea to disable text decoration for links in e-ink devices. There you don't have colours (just shades of gray) and it would be difficult to readers to know where there is a link without underlined words.

Last edited by RbnJrg; 02-26-2019 at 06:12 AM.
RbnJrg is online now   Reply With Quote
Old 02-25-2019, 03:15 PM   #5
najgori
Klak
najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'
 
najgori's Avatar
 
Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
for .mobi use custom html tags <mbp:nu>for text without decorations</mbp:nu>

edit: "without decorations" means no underlines as in this case

Last edited by najgori; 02-25-2019 at 03:17 PM.
najgori is offline   Reply With Quote
Old 02-25-2019, 10:39 PM   #6
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by najgori View Post
for .mobi use custom html tags <mbp:nu>for text without decorations</mbp:nu>

edit: "without decorations" means no underlines as in this case
@Najgori:

Are you quite sure that the old Mobipocket tags are still working? Because I seem to vaguely recall that they haven't in some time now. Didn't those start throwing Kindlegen errors some years back?

Hitch
Hitch is offline   Reply With Quote
Old 02-26-2019, 02:34 AM   #7
najgori
Klak
najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'
 
najgori's Avatar
 
Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
i belive they are still working in mobi7.
najgori is offline   Reply With Quote
Old 02-26-2019, 11:14 AM   #8
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by RbnJrg View Post
As you know Momoha, Amazon has three ebook formats: .mobi (the older one), .azw3/.kf8 and .kfx (the newest). I'm afraid of you can't disable the text decoration with .mobi and .azw3/.kf8 formats. It could be possible with .kfx but the old Kindle models don't support it, so in those device you only could deal with .mobi and .azw3/.kf8. IMHO you can't do anything to handle that "issue". Maybe Hitch (the specialist in the Amazon's formats in this forum and she knows a lot about Kindle) can tell you something different but in this case I doubt it.
Oh, yes, indeedy, I am All-Knowing.

Quote:
EDIT: I don't think it's a good idea to disable text decoration for links in e-ink devices. There you don't have colours (just shades of gray) and it would be difficult to readers to know where there is a link without underlined words.
I wanted to second this--in fact, I believe fairly strongly that getting cute with coloration for links is asking for trouble. People are acclimated to seeing links in blue. Not to mention, when you mess with font colors, you can run afoul of things like NightMode, as well.

And yes, in eInks, if you don't have underlining, how the hell would ANYONE know that the text=links? I go through this conversation at least once a day with a client, for the same reasons. Go with what people know and understand. I had a client that INSISTED that her TOC "links" be black, right? I warned her, I tried refusing to do it, but...client is always right, right?

Wanna guess which book we got back, in under 90 days, due to a KQN, over the links being black and not underlined? YUP. Why? Because customers complained that the TOC "wasn't interactive." It was--but they didn't see it that way. They never even tried it, because it was out of context. Not blue, not underlined.

Offered FWIW.

Hitch
Hitch is offline   Reply With Quote
Old 02-26-2019, 01:54 PM   #9
najgori
Klak
najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'
 
najgori's Avatar
 
Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
it's ok for "external" toc to be black, while html toc gotta be both blue and underlined and god forbid to put html toc at the end of book - "remember the golden rule! whoever has the gold, makes the rules!"
najgori is offline   Reply With Quote
Old 02-26-2019, 02:35 PM   #10
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by najgori View Post
it's ok for "external" toc to be black, while html toc gotta be both blue and underlined and god forbid to put html toc at the end of book - "remember the golden rule! whoever has the gold, makes the rules!"
Well...if you make an external link black, (or any text, for that matter) you're still going to have the same issues--when someone uses Night mode, the text will simply disappear. Any forced text color has this unintended (possible) consequence. Internal or external.

The TOC at the end thing is related to how they calculate pages read, for the KENP. If you put clickbait or the TOC at the back of the book, Jane could buy the book, click to see the TOC, go to the end of the book, and that would trigger "all pages read" for payment to the author. Amazon doesn't want that--it's "cheating" effectively. They want to pay for the pages read, period. That's the reasoning for that now.

The reasoning for it before the KENP was somewhat different, and it's moot now.

Hitch
Hitch is offline   Reply With Quote
Old 02-26-2019, 03:38 PM   #11
najgori
Klak
najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'
 
najgori's Avatar
 
Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
yup. if someone could come up with something like... let's call it media query
@media night-mode {}
...
<irony off>
i have no horse in this race so as poet once said "whatever's cool with me".
najgori is offline   Reply With Quote
Old 02-26-2019, 04:28 PM   #12
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by najgori View Post
yup. if someone could come up with something like... let's call it media query
@media night-mode {}
...
<irony off>
i have no horse in this race so as poet once said "whatever's cool with me".
lol...the :inherited mq just for that would be great, and I wish like hell it worked. We drag it out and test it frequently.

Spoiler:
(The reason that this is something with which I am acutely aware is that I realized, a while back--quite a while--that one of my bookmakers was making black TOCs. It's a passive-aggressive defiance thing, with this one; s/he was only making NCXes,for the MOBIs, and I said, uh, no, make the toc.html too, and so, then, suddenly, they were black. Using inherited. I had to physically PROVE that the damn things would disappear. {sigh} Yup, bein' the boss is just so cool--not.)


But I can think of so MANY other things I wish I had...mqs that targeted specific devices, like the PPW, Voyage and Oasis, and "publisher font" rather than screen resolutions; mqs for the iOS devices...(sigh).

Hitch
Hitch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub to mobi font colour change EdwardTrunk Conversion 4 09-29-2014 09:27 AM
Creating a Custom Column Link a_daley Library Management 5 02-16-2014 05:56 AM
Mobi hypertext link not working newbi Calibre 5 11-16-2011 05:36 PM
Overridng link colour with extra CSS cyruss Conversion 2 04-08-2011 07:58 AM
PRS-650 Modifications (Hacks, Custom Firmware, etc.) Link-Collection Achiever Sony Reader 8 11-27-2010 10:07 AM


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


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