Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 01-22-2011, 03:09 AM   #1
kentmatt
Member
kentmatt doesn't litterkentmatt doesn't litter
 
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?
kentmatt is offline   Reply With Quote
Old 01-22-2011, 10:44 PM   #2
kentmatt
Member
kentmatt doesn't litterkentmatt doesn't litter
 
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
kentmatt is offline   Reply With Quote
Advert
Old 01-22-2011, 11:03 PM   #3
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
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>
On the Kindle 2 (and 3?) this will have a background color.
wallcraft is offline   Reply With Quote
Old 01-23-2011, 12:46 AM   #4
kentmatt
Member
kentmatt doesn't litterkentmatt doesn't litter
 
Posts: 22
Karma: 116
Join Date: Jul 2010
Device: none
Quote:
Originally Posted by wallcraft View Post
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,
Yeah, I tried the table thing, but as I said, large chunks of text tend to run off the bottom of the 'page', with no way to see the remainder - both in the mobi reader, and on my kindle3 (it says to move the 5way controller to see the rest of the table, but it doesn't work).

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
kentmatt is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 02:07 AM.


MobileRead.com is a privately owned, operated and funded community.