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

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 11-21-2010, 06:19 PM   #1
mufc
Connoisseur
mufc doesn't littermufc doesn't litter
 
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
mufc is offline   Reply With Quote
Old 11-21-2010, 10:33 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,287
Karma: 5381913
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
kovidgoyal is offline   Reply With Quote
 
Advertisement
Old 11-22-2010, 05:57 AM   #3
marbs
Zealot
marbs began at the beginning.
 
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
marbs is offline   Reply With Quote
Old 11-23-2010, 02:51 PM   #4
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 780
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle PaperWhite, Motorola Xoom
Quote:
Originally Posted by marbs View Post
if you do not want the link at all you could use remove_attrs to remove the href attribute
This is what I recommend for link cleanup:

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
This converts all links to text (less tags means safer rendering)
kiklop74 is offline   Reply With Quote
Old 11-24-2010, 08:56 AM   #5
mufc
Connoisseur
mufc doesn't littermufc doesn't litter
 
Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
removed

Last edited by mufc; 11-26-2010 at 06:31 PM. Reason: removed
mufc 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
Hyperlink adachim Kobo Reader 0 11-02-2010 11:57 PM
will kindle dx help publishers see they need to hyperlink textbooks? med007 Amazon Kindle 8 10-16-2010 05:08 PM
Is a hyperlink editor in sight? HarryT Sigil 2 08-12-2010 09:18 AM
Hyperlink? fcoulter Sigil 3 03-28-2010 11:31 AM
RFE: Remove remove tags in bulk edit magphil Calibre 0 08-11-2009 11:37 AM


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


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