01-22-2011, 03:09 AM | #1 |
Member
Posts: 22
Karma: 116
Join Date: Jul 2010
Device: none
|
Mobipocket conversion: div bgcolor and border
I'm trying to get a mobi file with 'sidebars' (not really on the side) - simply blocks of text that are identified with a grey background and a border:
I know that fancy css will not work, so I went with this: <div border="1" bgcolor="#EEEEEE"> which renders fine as HTML, but when I run the conversion to Mobi in Calibre, neither the border nor the grey background are visible, either in the Caliber viewer or in the Mobi Reader (under WINE). (Note: I'm on Linux, so using the Mobipocket conversion software itself is not an option) Is there something that will work? |
01-22-2011, 10:44 PM | #2 |
Member
Posts: 22
Karma: 116
Join Date: Jul 2010
Device: none
|
OK, apparently what I posted was BS - I was following the instructions at http://www.mobipocket.com/dev/articl...guidelines.htm
Which states: "Boxes & Important information display Use a <div> tag with e.g. a light red background color and a border="1" attribute to highlight a paragraph. " Once I stripped out my CSS and used their suggestion, it doesn't work in either Firefox or Epiphany - and so of course it wouldn't work when converted to MOBI. Any suggestions on how to get a border and background around a block of text in HTML that will convert to mobi (CSS doesn't stay, and using a table doesn't work if the text goes off the 'page'). Last edited by Alexander Turcic; 02-05-2011 at 07:46 PM. Reason: fix broken link |
01-22-2011, 11:03 PM | #3 |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
There isn't an easy way to get a background color in MOBI.
One simple approach is to use horizontal rules to separate the text. In Kindle Formatting: The Complete Guide Joshua Tallent suggests using tables for pull quotes, for example: Code:
<div align="center"> <table cellpadding="10" style="margin-left:0;"> <tr><td><hr width="500" /></td></tr> <tr><td align="center" border="1" style="background-color:#C0C0C0">We must have a concrete idea of anything, even if it be an imaginary idea, before we can comprehend it.</td></tr> <tr><td><hr width="500" /></td></tr> </table> </div> |
01-23-2011, 12:46 AM | #4 | |
Member
Posts: 22
Karma: 116
Join Date: Jul 2010
Device: none
|
Quote:
I think the <hr> is the best thing - perhaps changing the font as well. Or maybe I should just chuck mobi altogether, and install FBReader on my Kindle |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Little bug in bgcolor for author_sort? | Coleccionista | Calibre | 4 | 11-12-2010 10:57 AM |
Conversion problem: HTML + pictures -> Mobipocket | Manichean | Calibre | 9 | 12-08-2009 08:55 AM |
ePub to Mobipocket conversion question | AlexBell | Calibre | 3 | 08-29-2009 11:09 AM |
Charge for Mobipocket conversion? | SimonDrake | Lounge | 4 | 03-28-2008 05:59 AM |
PDF to MobiPocket Conversion | ig88 | iRex | 2 | 05-05-2007 02:05 PM |