View Full Version : Easily create two column (newspaper-style) ebooks


nrapallo
01-11-2009, 01:18 PM
I've just discovered how to create two column ebooks from a well designed and CSS enhanced .html source file.

As an example, I took a PG offering entitled Little Stories for Little Children by Anonymous (http://www.gutenberg.org/etext/22896) using the HTML .zip (22896-h.zip) that I had already converted to .IMP format (posted here (http://www.mobileread.com/forums/showthread.php?t=35112) along with its source).

What I did was surround the main text of the ebook (after the cover image, title page and table of contents AND before the end credits) with the following html tags:<div style="oeb-column-number:auto">

{main text of the ebook}

</div>

For years I've seen the "oeb-column-number:1;" style entry in the header and footer html code that gets produced by GEBLibrarian and now Mobi2IMP, but didn't know exactly what it did.

Well, it's useful for NOT making some of the heading or illustrations abide by this newly discovered two column rule. What you need to do then for anything within the main text of the ebook that you need only displayed in one column mode is add that in-line style ("oeb-column-number:1;") to the <h2> or <div class="figcenter"> constructs.

Now, have a look at the same ebook, in two column mode, in the below attached .imp ebooks (with html source .zip).

For reference, these are links to the previous one column EBW1150 .imp (http://www.mobileread.com/forums/attachment.php?attachmentid=20125&d=1230674229) and one column REB1200 .imp (http://www.mobileread.com/forums/attachment.php?attachmentid=20126&d=1230674229)

Note the only things changed (see bold parts) were these lines: h2 {
text-align: center; /* all headings centered */
page-break-before: always;
clear: both;
oeb-column-number:1;
}

.figcenter {margin: auto; text-align: center; margin-top: 3em; oeb-column-number:1;}


<div style="oeb-column-number:auto">

{main text of the ebook}

</div>


Have fun with this!