|09-07-2013, 06:49 PM||#1|
Join Date: Oct 2012
Device: Kindle Paperwhite
Warning due to nested p class
Kindlegen gives me a warning "Forcefully closed opened Tag" because I have a nested p class.
<p class="chapterOpenerText">First sentence.<p class="centerImage"><img src="../Images/image00139.jpeg" alt="43.jpg"/></p>Second sentence.</p>
I could eliminate the warning by moving the image down.
<p class="chapterOpenerText">First sentence. Second sentence.</p>
<p class="centerImage"><img src="../Images/image00139.jpeg" alt="43.jpg"/></p>
But that's not what I want to do. How do I eliminate the warning without putting the image at the end? I could do this I guess:
<p class="chapterOpenerText">First sentence.</p><p class="centerImage"><img src="../Images/image00139.jpeg" alt="43.jpg"/>Second sentence.
But I don't want to do that either. Second sentence must belong to the <p class="chapterOpenerText">
|09-08-2013, 01:40 AM||#2|
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad mini, Lenovo 2 A7 tablet
I suggest that you check the XHTML with the W3C validation service at
I think you will find that the XHTML is invalid. And if the XHTML is invalid the ePub will be invalid, and if the ePub is invalid the KF8 will be invalid.
|09-11-2013, 12:00 AM||#4|
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
Can't remember where I saw it all laid out, but it is not possible to nest <p> paragraphs. You can nest <div>s, and put <p>s inside <div>s, and <span>s (of course) within <p>s. Some of the html code that Adobe published in their Alice In Wonderland demo doesn't pass validation...
|09-11-2013, 03:35 AM||#5|
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
True, in XHTML <p> elements cannot contain other block-level elements (such as <p>, <div> or <blockquote>). But you could have a <span> with display:block
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|PRS-650 SD Card Importance? SDHC, SDHC Class 4, Class 10 etc is it important||Renji||Sony Reader||11||12-03-2011 12:30 PM|
|Content Nested collections||fartang||Amazon Kindle||1||04-09-2011 12:18 PM|
|Content nested collections||alexxx||Amazon Kindle||6||06-22-2010 06:05 PM|