View Full Version : Nested Span?


Turtle91
05-12-2013, 12:15 AM
I have seen this issue multiple times...usually after a Calibre conversion...and I'm wondering if there was some obscure property of a nested span tag that I'm not aware of...

I see something similar to:
<span><span class="calibre26">CONGRATULATIONS</span></span>The only thing in the CSS is ".calibre26"...no styling for "span span" or even for just "span" for that matter. To me that means the outer span tags are completely superfluous... (yay, I got my SAT word in for the day!)

Is there some device/app out there that requires the double span thing, or is that just a Calibre quirk?

Toxaris
05-12-2013, 02:40 AM
I believe old version of iBooks only did certain things after it was wrapped in a span. I hope they solved that by now.

Tex2002ans
05-12-2013, 04:13 AM
I believe old version of iBooks only did certain things after it was wrapped in a span.

Indeed, here is some more explanation:

http://www.mobileread.com/forums/showthread.php?t=118576

http://www.pigsgourdsandwikis.com/2010/06/beating-ibooks-bugs.html

Turtle91
05-12-2013, 04:25 AM
Well, that definitely answers my question...they are hacks to get ibooks to work. I feel better about not knowing about this issue...i avoid ibooks for more standards compliant readers/apps for my personal books.

For now, I'll just strip out the extraneous (ohhh 2 SAT words in one day/thread!! ;) ) spans.

Thanks!

dgatwood
05-20-2013, 02:47 PM
I believe old version of iBooks only did certain things after it was wrapped in a span. I hope they solved that by now.

IIRC, the spans are not necessary if you add the magic com.apple.ibooks.display-options.xml file with specified-fonts set to true. Otherwise, iBooks assumes that the book probably has crufty, broken CSS, and it ignores large swaths of it, e.g. font changes on spans.