Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-17-2024, 03:40 PM   #1
ebookscovers
Enthusiast
ebookscovers began at the beginning.
 
Posts: 49
Karma: 10
Join Date: Mar 2016
Device: Ipad mini 2
superscript colour issue

hi there. trying to change superscript to black. I have succeeded in changing superscript to black as per screen shot BUT the ePub checker rejects as follows:

ERROR(RSC-005): /OEBPS/Flow_8.xhtml(63,256): Error while parsing file: element "font" not allowed anywhere; expected the element end-tag, text or element "a", "abbr", "acronym", "applet", "b", "bdo", "big", "br", "cite", "code", "del", "dfn", "em", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "tt" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")


THIS IS CURRENTLY HOW THE CODE STANDS: CAN I REPLACE The <font color> tag with something else? this is the only superscript I want to make black. all others are fine.

<p id="box3_0" class="para-Normal-Local-5"><span class="char-Normal-Local-5">The Craytúreen</span><span class="char-Normal-Local-8"><sup><a id="box3_noteref_114" class="char-Normal-Local-57" href="Flow_8.xhtml#box3_footnote_114"><font color="black">3</font></a></sup></span><span class="char-Normal-Local-5"> </span></p>
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2024-12-17 at 20.27.25.png
Views:	126
Size:	359.2 KB
ID:	212532  
ebookscovers is offline   Reply With Quote
Old 12-17-2024, 04:15 PM   #2
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 315
Karma: 3196766
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
I would remove that tag and instead add something like

Code:
sup a {
  color: inherit;
}
to the CSS stylesheet. That rule sets the link's color to whatever <sup> is using, and <sup> more than likely hasn't got a color set at all, in turn inheriting its color from <p> (or others). It kind of daisychains the color selection all the way back, a < sup < p.

This is preferable to setting any text to black, which can cause problems in certain color modes. But it will still display as black whenever the parent text also displays black, which is presumably the goal here.

Note that the markup you've shared is pretty messy, and there's a chance of weird inheritance / specificity issues in cases like that, which can interfere with your attempts at styling overrides.

Last edited by phillipgessert; 12-17-2024 at 04:33 PM.
phillipgessert is offline   Reply With Quote
Advert
Old 12-17-2024, 04:20 PM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,974
Karma: 168961900
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
You would use style="color:black;" if you want to inline the code. Something like <span style="color:black;">....</span>

If you want to have all <a> content show in black, in the relevant CSS stylesheet, you could add:

Code:
a  {
color: black;
}
or color: #000000; if you want to be a bit obscure.
DNSB is offline   Reply With Quote
Old 12-17-2024, 04:22 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,025
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Why are you not using a CSS???? That is so
Besides if you set it for the sup (color:black;} in the CSS you got them all in one shot

You are setting a STYLE, which must be inside something liker a <span style="color:black">42</span>.
theducks is online now   Reply With Quote
Old 12-17-2024, 04:54 PM   #5
ebookscovers
Enthusiast
ebookscovers began at the beginning.
 
Posts: 49
Karma: 10
Join Date: Mar 2016
Device: Ipad mini 2
thanks this code worked fine. yes you are right!! it should be in the CSS!!


Quote:
Originally Posted by theducks View Post
Why are you not using a CSS???? That is so
Besides if you set it for the sup (color:black;} in the CSS you got them all in one shot

You are setting a STYLE, which must be inside something liker a <span style="color:black">42</span>.
ebookscovers is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Skipping forced registration on Libra Colour and Clara Colour shyhermit Kobo Reader 48 12-04-2024 12:56 PM
Calibre to Libra Colour comic issue dalekman9999 Devices 1 06-15-2024 06:17 AM
Superscript issue on Kindle App FullCircleDesign Kindle Formats 7 08-01-2013 06:49 AM
Superscript best practices? DiapDealer ePub 19 04-14-2012 04:28 PM


All times are GMT -4. The time now is 10:52 AM.


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