![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Border and text indent problem ePub to mobi
I'm not at all sure that this is the right forum for this query; if not, moderator please move.
The background to this query is that I prepare ebooks for the publishers below my signature - the publisher sends me a doc file, I prepare validated XHTML files, package them into an ePub file, and then convert to mobi with calibre. In the anthology I'm working on now one of the stories contains a 'top secret report' and the publisher wants a border around it. The report contains 'headings' which should be flush left, and are followed by unorganised list. I've made it work in ePub, as shown by the attached ADE.PNG. But it looks awful in mobi, as shown by the attached K4PC.PNG - there is no border, and the headings are not flush left. The CSS for the div containing the report is: div#report { padding: 5px; margin-top: 2em; border: 2px black solid; } The XHTML for the 'headings' is: <p class="flush">Potential Threat: Ballistic or Death Ray</p> And the CSS for the 'headings' is: .flush { text-indent: 0; } I know mobi is quite limited as to what it can do, and I tend to rely on calibre to modify the ePub file so that the mobi versin will look more or less the same as the ePub - so far as mobi will let it. And I know that the XHTML and CSS above works since it works in other parts of the same ebook. Is there any way of changing the XHTML and CSS so that calibre can produce the same effect in mobi as in ePub? |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,920
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I don't think border is allowed at the Paragraph layer in HTML3.2.
Border is allowed for a table ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
I've never attempted to do a table in ePub, but there's always a first time. Regards, Alex |
|
![]() |
![]() |
![]() |
#4 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,920
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Tables in ePub are just normal HTML tables, Alex. Nothing special about them.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thanks to you both, especially for the TestTable.epub
But commenting out the border doesn't make any difference - except of course to remove the border on the ePub. The headings on the mobi are still not flush left. It must be something else. I think I'm going to take that segment out of the anthology, and make an ebook out of it starting from scratch, testing almost at each line until I find out what's wrong. I loathe mobi with a passion. |
![]() |
![]() |
![]() |
#7 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Indents in Mobi are controlled with the "width=" attribute.
Eg, <p width="1em"> will give you a 1em indent, while <p width="-1em"> gives a 1em "outdent". |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
I'm afraid that's not much help to me, since I markup the doc files to valid HTML, then convert these files to valid XHTML as required by the ePub standards, then package them up to valid ePubs, then convert to mobi with calibre. I doubt that the markup you've suggested will validate in XHTM, but I will try.
|
![]() |
![]() |
![]() |
#9 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
No, I suspect you're right. I do it the other way around; I start with Mobi (which my iPhone insists on wanting to change to "zombie"
![]() |
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thanks, Harry. I have a new respect for your iPhone.
I've got it to work now - so far as I can tell, mobi choked on the div I put around the report, or the padding included in the div, or the fact that I had several tags in the div CSS. Anway, I've dumbed down the markup and it works. Regards, Alex |
![]() |
![]() |
![]() |
#11 | |
Bah, humbug!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 39,072
Karma: 157049943
Join Date: Jun 2009
Location: Chesapeake, VA, USA
Device: Kindle Oasis, iPad Pro, & a Samsung Galaxy S9.
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,344
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#13 | |
Bah, humbug!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 39,072
Karma: 157049943
Join Date: Jun 2009
Location: Chesapeake, VA, USA
Device: Kindle Oasis, iPad Pro, & a Samsung Galaxy S9.
|
Quote:
![]() ![]() We've had some members post some pretty embarrassing things because of auto-correct. ![]() Last edited by WT Sharpe; 04-08-2012 at 08:39 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
epub to mobi text wrap problem | Cubeology | Conversion | 1 | 12-27-2011 10:07 AM |
Image and Text problem from epub to mobi for Kindle DX | congngo | Conversion | 0 | 12-05-2011 04:48 PM |
Paragraph spaces in ePub to Mobi conversion disrupts indent formatting | markpearl | Conversion | 34 | 09-21-2011 02:42 PM |
Right edge indent problem with mobi/Kindle? | bfollowell | Workshop | 3 | 12-01-2010 04:42 AM |
Calibre Indent Issue When Removing Blank Lines (Converting From HTML to MOBI or EPUB) | David Derrico | Calibre | 5 | 08-04-2010 12:13 AM |