![]() |
#1 |
Connoisseur
![]() ![]() Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
|
Remove color behind hyperlink
I have great success creating my own or modifying other recipes for best readability of my sony ereader. One thing I wanted to do and did was remove the hyperlink properties using
a {text-decoration: none; color: black;} a [href] {text-decoration: none; color: black;} I have tried but failed to remove the highlight background from the hyperlinks. They highlighted background does not show up when reading in Calibre but does when reading on my ereader. Am I correct in assuming that I need to change something in the css of epub output ? If so where is this file and what is it called ? Thanks |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,214
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
you can't change that in css. To change that you have to use preprocess_html and change a tags to span tags
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() Posts: 122
Karma: 10
Join Date: Jul 2010
Device: nook
|
if you do not want the link at all you could use remove_attrs to remove the href attribute
|
![]() |
![]() |
![]() |
#4 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
Quote:
Code:
def preprocess_html(self, soup): for alink in soup.findAll('a'): if alink.string is not None: tstr = alink.string alink.replaceWith(tstr) return soup |
|
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
|
removed
Last edited by mufc; 11-26-2010 at 05:31 PM. Reason: removed |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hyperlink | adachim | Kobo Reader | 0 | 11-02-2010 10:57 PM |
will kindle dx help publishers see they need to hyperlink textbooks? | med007 | Amazon Kindle | 8 | 10-16-2010 04:08 PM |
Is a hyperlink editor in sight? | HarryT | Sigil | 2 | 08-12-2010 08:18 AM |
Hyperlink? | fcoulter | Sigil | 3 | 03-28-2010 10:31 AM |
RFE: Remove remove tags in bulk edit | magphil | Calibre | 0 | 08-11-2009 10:37 AM |