08-03-2022, 01:03 PM | #1 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Centring a table on page
I'm putting together an ePub for use on a Kobo Libra 2 using Sigil, and I've been having issues with the Kobo not recognizing my css for centring a table on a page.
Initially, I was using Code:
table.center { margin-left:auto; margin-right:auto; } Code:
<div style="width:100%;"></div> Code:
table#table1 { width:70%; margin-left:15%; margin-right:15%; } I'm not sure if this is limited to Kobo devices, or itf its a common thing among eReaders and eBook formatting, but is there an accepted standard way of centring a table on a page that works with Kobo? (There were a lot of places I could have posted this - Sigil, Kobo, etc - but nothing seemed ideal for this type of question, so I put it here. I'm happy enough if mods move it to somewhere more appropriate.) |
08-03-2022, 01:35 PM | #2 |
Bibliophagist
Posts: 40,603
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
If you are sending this as an epub, RMSDK has never allowed use of the margin auto trick to center on a page (Thanks, Adobe!). If you send the ebook as a kepub, it should work.
|
08-03-2022, 03:39 PM | #3 |
Running with scissors
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
|
If the table is wider than the page does it stick out beyond the right edge of the screen? In other words, what's the difference between a table that is too wide versus one that's small enough to center?
|
08-03-2022, 07:15 PM | #4 |
Running with scissors
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
|
I had the opportunity to try a table. I got the flush left like you are. With a table wider than the page it folds lines within the cells and keeps the entire table visible.
Not the answer you want but to me having the table flush left isn't the worst thing in the world. You could make its left margin be the same as your paragraph indent. |
08-04-2022, 01:01 PM | #5 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
I'm not interested in converting to kepub at the moment; I sideload my books and would prefer to keep them all as ePub in case I switch devices.
I know its not the worst thing in the world, but if there were an option between having it look bad, and having it look good, I'd choose the latter. Unfortunately it doesn't seem like there is a good solution. Thanks anyways. |
08-04-2022, 02:48 PM | #6 |
Bibliophagist
Posts: 40,603
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I've only found one instance where the additional spans added during the conversion to epub have caused an issue with rendering the epub on a non-Kobo devices and that epub required major surgery to pass epubcheck. The main advantage to me of kepub format is the ability to use epub3 features. I am not using the KoboTouchExtended driver as my preference is to use kepubify for the conversion. I also prefer left justified aka ragged right text so hyphenation is not the issue it seems to be for many who read fully justified text.
|
08-04-2022, 05:05 PM | #7 |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
By using the KoboTouchExtended driver to send ePub to your Kobo, you can send them as KePub (if you want) and still keep just the ePub in your Calibre library. So if you do ever switch to a different device, you'll still have all of your ePub in your library.
|
08-04-2022, 05:43 PM | #8 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Thanks for the suggestion. I keep my ePubs in a git repo, with a subdirectory I moved read books into. I only import books to Calibre to work on metadata and conversion, then remove them afterward. It's a little weird, and maybe not the best/most efficient, but I work on books from multiple PCs so keeping my library in a repo instead seems to work best for me.
|
08-05-2022, 05:31 AM | #9 | |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Yes, I do find it very odd to keep your eBooks on a git repo. Is this git repo protected so nobody else can access it? |
|
08-09-2022, 06:33 PM | #10 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
It's a private repo. I use mainly because I've sunk a lot of time obsessively building or optimizing ebooks so I'm paranoid of losing my library to a crash/fire/etc.
I've recently looked into file/folder sharing, as it does seem a lot more convenient. But for some reason I can't get my laptop to see the shared folder on my desktop. I'm a new parent so I haven't had the time yet to figure out what the issue is, but that may streamline things quite a bit. |
08-09-2022, 07:43 PM | #11 | |
Wizard
Posts: 1,363
Karma: 6794938
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
|
|
08-22-2022, 11:32 AM | #12 | |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Quote:
Thanks again! Last edited by Vanguard3000; 08-23-2022 at 10:39 AM. |
|
08-22-2022, 02:45 PM | #13 |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Please edit your post to say what you got working as there are now two issue going on in the thread.
|
08-23-2022, 10:40 AM | #14 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
|
08-23-2022, 04:52 PM | #15 |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
Tags |
center, css, margin, table |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help: Table of Contents page break | joliva979 | Conversion | 4 | 03-09-2015 11:41 PM |
table of contents redirects to front page | Eriks | Conversion | 2 | 10-01-2014 01:45 PM |
Auto Centring after title sort | transmitthis | Calibre | 4 | 02-17-2012 12:40 PM |
Share screenshot of Kindle display page with table | pengrus | Amazon Kindle | 3 | 02-18-2009 01:41 PM |
Table of Contents only Goes to Page 1 | Tefeari | Sony Reader | 0 | 10-10-2008 11:04 PM |