View Single Post
Old 04-05-2012, 02:02 AM   #1
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
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?
Attached Thumbnails
Click image for larger version

Name:	ADE.PNG
Views:	255
Size:	32.5 KB
ID:	84851   Click image for larger version

Name:	K4PC.PNG
Views:	244
Size:	17.0 KB
ID:	84852  
AlexBell is offline   Reply With Quote