06-18-2023, 07:33 PM | #16 |
Wizard
Posts: 1,122
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
@JSWolf,
He is wanting vertical centering on the page. See post#12 |
06-18-2023, 11:37 PM | #17 |
Bibliophagist
Posts: 35,880
Karma: 145675564
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Not sure if this is exactly what was wanted but it seems to work for me. Not quite sure from my notes but think I lifted this from a post on MobileRead a few years back (2010???).
Code:
<div class="vcenter1"></div> <div class="vcenter2"> <table> <tbody> <tr> <td> <p>Happy birthday to you,</p> <p>Peace and happiness to you,</p> <p>May your life be filled with gladness,</p> <p>Happy birthday to you!</p> </td> </tr> </tbody> </table> </div> Code:
html, body { height: 100%; margin: 0; padding: 0; } .vcenter1 { float: left; height: 45%; margin-bottom: -2em; } .vcenter2 { clear: both; height: 0em; position: relative; } table,tr,th { height: 100%; width: 100%; text-align: center; } |
06-19-2023, 04:48 AM | #18 | |
Resident Curmudgeon
Posts: 74,313
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
/noindent { text-indent: 0; } |
|
06-19-2023, 01:44 PM | #19 |
A Hairy Wizard
Posts: 3,108
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I use a technique very similar. It uses table display properties without actually having to put any table tags. It automatically adjusts the top and bottom spacing so it’s consistent across devices and display sizes. It just uses two <div>s like this:
Code:
<div class="v-ctr"> <div> <p>Happy birthday to you,</p> <p>Peace and happiness to you,</p> <p>May your life be filled with gladness,</p> <p>Happy birthday to you!</p> </div> </div> You can include any styling, like the no-indent, italics, text-alignment, etc. in that CSS, so there is no need for additional class= declarations. I have saved this as a clip in Sigil, so all I need to do is highlight the lines I want vertically centered and click on the clip. It works great for things like the title page, Dedication, Acknowledgment, etc. ===<>=== Edit: Here is the CSS I use for the vertical center: Code:
div.v-ctr {
height: 100%;
width: 100%;
display: table;
position: fixed;
padding: 0;
margin: 0;
text-indent: 0;
}
div.v-ctr div {
display: table-cell;
vertical-align: middle;
padding: 0;
margin: 0;
text-align: center;
font-style: italic;
color: purple;
}
The red color is any additional styling you wish to add like horizontal alignment, color, italics, etc. I've attached an example image. Also, here is the clip I've set if anyone is interested: Code:
<div class="v-ctr">\n<div>\n\1\n</div>\n</div> Last edited by Turtle91; 06-20-2023 at 10:18 PM. |
06-19-2023, 04:08 PM | #20 |
Enthusiast
Posts: 26
Karma: 10
Join Date: Mar 2021
Device: Apple iPad with Kindle
|
A big "thank you" to everyone who has responded! I tried Jon's suggested fix first, and it works, so I am very relieved. I like the way the text is centered on the page; it looks very nice on my ipad.
RatherBWriting |
06-19-2023, 04:13 PM | #21 |
Enthusiast
Posts: 26
Karma: 10
Join Date: Mar 2021
Device: Apple iPad with Kindle
|
Where can I find the download for the Sigil epubcheck? When I click on my Plugins folder, it is not there. I do have Java on my laptop.
Thanks so much for your help - it is very much appreciated! RatherBWriting |
06-19-2023, 05:05 PM | #22 | |
Bibliophagist
Posts: 35,880
Karma: 145675564
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
06-20-2023, 11:47 AM | #23 |
Enthusiast
Posts: 26
Karma: 10
Join Date: Mar 2021
Device: Apple iPad with Kindle
|
I've downloaded/installed Java. I have Sigil version 1.4.3.
I've downloaded epubcheck-5.0.0.zip from w3c.github ("latest version of EPUBCheck") to my Downloads folder. I copied/pasted epubcheck to the Plugin-Launchers folder of Sigil, which I found in my Programs folder, and unzipped the files. Then I opened up Sigil and clicked on Plugins. When I click Manage Plugins, Add Plugin, I see two folders, python and epubcheck-5.0.0-zip, even though I already unzipped the files. If I click on epubcheck-5.0-0-zip, I get a message saying it is not a valid Sigil plugin. What have I done wrong?? Thanks so much in advance for your help - RatherBWriting |
06-20-2023, 01:31 PM | #24 |
A Hairy Wizard
Posts: 3,108
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
You don’t need to download epubcheck from w3c. Just download the plug-in from the link above and it will do all the work.
|
06-20-2023, 04:44 PM | #25 |
Enthusiast
Posts: 26
Karma: 10
Join Date: Mar 2021
Device: Apple iPad with Kindle
|
I followed your instructions, Dion, and it worked beautifully! Thank you so much. I greatly appreciate your help, and the help of the many talented and helpful people on this message board.
Thank you! RatherBWriting |
06-20-2023, 10:16 PM | #26 |
A Hairy Wizard
Posts: 3,108
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
No worries - I'm glad you got it working!
I've also added the CSS for the vertical centering with 2 <div>s to my post above. Cheers! |
06-21-2023, 10:40 AM | #27 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
To any Kobo users who are following this, I think this technique will only work in kepubs not standard epubs. I suspect the CSS position: fixed; is a problem for Kobo's Adobe epub reading app. |
|
06-21-2023, 01:16 PM | #28 |
A Hairy Wizard
Posts: 3,108
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Thanks jackie_w!
Yes, there are very few readers/apps/devices that support the FULL ePub standard, some definitely better than others. Hopefully the developer of the app/device is continually updating and fixing things as bugs/display issues get reported. If you find an area that kepub doesn’t support then I highly recommend reporting it to the developer; the more reports they get the higher priority fixing it becomes. You can make reports to Kobo at the following email: kobo-renderingissues@mail.rakuten.com On the other hand, Adobe likes to think they do everything perfectly and any problems with their software are because the user isn’t using it properly … Their ePub renderer ADE is no exception… support for older systems/devices is slim… why, when they can just have you buy the newest version!?! It is very important for the ebook creator to know the capabilities of their target market’s devices. You can provide alternate styling in your CSS via media queries to handle those sub-standard occurrences. Last edited by Turtle91; 06-21-2023 at 01:19 PM. |
06-21-2023, 02:03 PM | #29 | |
Resident Curmudgeon
Posts: 74,313
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
06-21-2023, 02:25 PM | #30 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
OTOH, do we know that PocketBook devices actually use an out-of-the-box Adobe reading app? I suppose it's possible that PocketBook have done their own improvements. |
|
Tags |
download epub check, epubcheck |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ToC, sub-chapters, kindles | Keybounce | Conversion | 3 | 08-15-2019 11:20 PM |
Please, Please Help Me! TOC and Chapters | jemimaras | Conversion | 3 | 03-25-2015 10:50 PM |
Chapters & TOC | jkolnick | Conversion | 0 | 05-26-2011 11:53 AM |
TOC Chapters | taraboom11 | Calibre | 4 | 03-03-2011 08:10 PM |
azw to mobi: Not detecting chapters/page break at chapters and no TOC | RachDvn | Calibre | 3 | 01-16-2011 09:53 AM |