07-28-2012, 10:49 AM | #1 |
Addict
Posts: 320
Karma: 56788
Join Date: Jun 2011
Device: Kindle
|
CSS/HTML question
I'm trying to duplicate the effect where a heading has some text justified to the left followed by some blank space, and then some text justified to the right, all on the same line (see circled area on attached image).
My instinct would be to create a single-row table with two cells. However, I know that pre-KF8 mobi files struggle with tables (I don't know how well KF8 deals with them). My question then is this: is there another way to achieve that formatting effect, and if not, does anyone know how well a KF8 conversion from epub in Calibre renders tables (for display on a Kindle device). I realize this is a little convoluted... |
07-28-2012, 11:22 AM | #2 | |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
No guarantee that it will work on a mobi, but an alternative to a table |
|
Advert | |
|
07-28-2012, 11:41 AM | #3 |
Addict
Posts: 320
Karma: 56788
Join Date: Jun 2011
Device: Kindle
|
@mmat1 - veddy veddy clever. Thanks for that. I'm going to play around with that and the table option and see how they convert and render on a Kindle. FWIW, the KF8 conversion viewed through calibre's reader rendered just fine.
|
07-28-2012, 12:05 PM | #4 |
Resident Curmudgeon
Posts: 75,862
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
07-28-2012, 12:31 PM | #5 |
Addict
Posts: 320
Karma: 56788
Join Date: Jun 2011
Device: Kindle
|
weird....worked fine with me... Not only that, but it rendered perfectly on the kindle, even when the table wouldn't. What viewer were you using that made it render incorrectly? did you make any additions to the text?
|
Advert | |
|
07-28-2012, 12:34 PM | #6 |
Grand Sorcerer
Posts: 12,602
Karma: 74358024
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Didn't work for me either in ADE; the right hand side seems to be a line above the left hand side.
|
07-28-2012, 12:39 PM | #7 |
Jr. - Junior Member
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
|
I tried Mantano reader and it failed - right above the left.
Sure would like to see a solution to this problem. Regards - John |
07-28-2012, 12:45 PM | #8 |
Grand Sorcerer
Posts: 12,602
Karma: 74358024
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Does this idea help? http://css-tricks.com/left-align-and...the-same-line/
|
07-28-2012, 01:01 PM | #9 |
Interested in the matter
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
This works fine in ADE
test B.epub |
07-28-2012, 01:06 PM | #10 | |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
It seemes to work well for me but i didn't check it fully. I got the same results with ADE as the others. You should give PeterT's suggestion a try ... |
|
07-28-2012, 01:17 PM | #11 |
Addict
Posts: 320
Karma: 56788
Join Date: Jun 2011
Device: Kindle
|
Interesting... none except mmat's seems to render as intended in Sigil (or consequently in Calibre). likewise, the mobi/KF8 conversions don't render correctly. It seems you can either design the epub to display correctly in calibre (and its KF8 conversion to render correctly on Kindle), or you can design it to render correctly on ADE, but not both.
EDIT: Wrote bad code... got bad result. GIGO. ignore this post Last edited by ElMiko; 07-28-2012 at 01:30 PM. |
07-28-2012, 01:19 PM | #12 | |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
this seams to be the solution, following the advice given by PeterT's link (Tested with ADE ) |
|
07-28-2012, 01:25 PM | #13 |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
|
07-28-2012, 01:30 PM | #14 |
Addict
Posts: 320
Karma: 56788
Join Date: Jun 2011
Device: Kindle
|
You're all rockstars. thanks for the help.
@mmat- yeah, i just figured that out myself.... feeling pret-tee dumb. for the record, renders poifectly on a Kindle, using calibre's KF8 conversion. Last edited by ElMiko; 07-28-2012 at 02:06 PM. |
07-28-2012, 02:27 PM | #15 |
Resident Curmudgeon
Posts: 75,862
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Same as PeterT. I used ADE for Windows to view it. I did have a look at the code and I did notice that each header was supposed to be on a separate line as they both used paragraph level coding.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
epub code snippets (html / css) | zelda_pinwheel | ePub | 196 | 10-09-2016 04:21 AM |
Importing css in html files | shotsky | Conversion | 6 | 07-14-2012 05:34 PM |
HTML/CSS for (German) s p a c e d o u t emphasis | frabjous | Workshop | 21 | 05-16-2011 04:52 PM |
Small html/css bug | twaits | Calibre | 5 | 01-12-2010 10:26 AM |
HTML and CSS for Dummies | weedfreak | Sigil | 17 | 01-07-2010 09:34 PM |