Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-28-2026, 06:36 PM   #1
Solitaire1
Observant Owl
Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.
 
Solitaire1's Avatar
 
Posts: 15,205
Karma: 70503010
Join Date: Nov 2009
Device: NookColor, Nook Glowlight 4
Inability to Center Text in EPUBs

I recently decided to transition from making my ebooks as PDFs to making them as EPUBs. The reason I chose to use PDF before is because of the formatting control it gave me over my ebooks, and it would look on my ereader the same way it looked on my computer, which was something I couldn't achieve with EPUBs. However, having to reformat my ebooks when I change ereaders is a bit of a pain although its not as much of a pain than it used to be. Since it has been a while before I tried to make EPUB ebooks, I decided to see if it was time to revisit it again.

I use LibreOffice and it has the option to export documents to EPUB (either directly or giving you the option to set some of the settings and/or metadata). To ensure that I had no issues with Calibre I updated it to the current version (version 9.9). I took an ebook that I had saved as a OpenDocument Text file and generated an EPUB from it. I loaded the EPUB in to Calibre, checked it, and Calibre Ebook Viewer showed that the text I wanted centered was centered. However, when opened the ebook on my ereader (Nook Glowlight 4) all of the text that was supposed to be centered was not, all of it was ragged right (flush with the left margin).

This was the issue that caused me to choose PDF over EPUB, because over a decade ago I had the same issue when I made EPUB ebooks. I tried using styles and also direct formatting to try and get the text to center on my ereader, but nothing seems to work. I decided to try again because maybe things are different now.

I was wondering if it was just an issue with my ereader (I don't think so because I had the same issue when I was using my Nook Color over a decade ago), or could it be an issue with the tool I was using to make the EPUBs (the LibreOffice export option), an issue with the OpenOffice Text format as a source, or I will need to go into the EPUB coding itself to fix the problems. Another issue I discovered is that on my ereader I can change some aspects of an ebook's appearance but not all of them (I can change the font, line spacing, and justification but I can't change the size of the text). This takes away one of the main advantages of EPUB for me (I can adjust the way the ebook looks on my ereader rather than having to change the document and recreate the PDF).

Any advice/guidance would be appreciated.
Solitaire1 is offline   Reply With Quote
Old 05-28-2026, 06:45 PM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,833
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
I would say it is an issue with the CSS.

Can you scramble the ebook and upload?
Karellen is offline   Reply With Quote
Advert
Old 05-28-2026, 07:37 PM   #3
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,973
Karma: 82520964
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Not all eReader software supports all CSS. Some might possibly have settings to control how to display content. For instance MoonReader Pro has options for Disable CSS Styles and Disable Alignment. Cool reader has similar options.

You might like to post in the Nook forum here and see if others have had a similar issue
PeterT is offline   Reply With Quote
Old 05-28-2026, 07:41 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 83,567
Karma: 153646251
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
It could be the justification setting causing your centered text to not be centered. Turn that off and see if your centered text is now centered.
JSWolf is offline   Reply With Quote
Old 05-28-2026, 11:01 PM   #5
Solitaire1
Observant Owl
Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.
 
Solitaire1's Avatar
 
Posts: 15,205
Karma: 70503010
Join Date: Nov 2009
Device: NookColor, Nook Glowlight 4
Quote:
Originally Posted by JSWolf View Post
It could be the justification setting causing your centered text to not be centered. Turn that off and see if your centered text is now centered.
I changed the justification setting to ragged right and the items that are supposed to be centered still aren't on my ereader.
Solitaire1 is offline   Reply With Quote
Advert
Old 05-28-2026, 11:10 PM   #6
Solitaire1
Observant Owl
Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.
 
Solitaire1's Avatar
 
Posts: 15,205
Karma: 70503010
Join Date: Nov 2009
Device: NookColor, Nook Glowlight 4
Quote:
Originally Posted by PeterT View Post
Not all eReader software supports all CSS. Some might possibly have settings to control how to display content. For instance MoonReader Pro has options for Disable CSS Styles and Disable Alignment. Cool reader has similar options.

You might like to post in the Nook forum here and see if others have had a similar issue
I will do so. Thanks for the information.

I thought one of the major advantages of EPUB (and an argument against PDF) is that you can adjust how the text will appear on your ereader. That was the major reason I decided to try EPUB again, along with not having to reformat my ebooks to adjust them to a new screen size.

I've been checking YouTube videos and found that there are a number of issues with the EPUB format, such as difficulty in displaying more than one font. Based on what I've seen, if my ebook reader supported it I might be better off using text files for my ebooks.
Solitaire1 is offline   Reply With Quote
Old 05-28-2026, 11:15 PM   #7
Solitaire1
Observant Owl
Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.
 
Solitaire1's Avatar
 
Posts: 15,205
Karma: 70503010
Join Date: Nov 2009
Device: NookColor, Nook Glowlight 4
Quote:
Originally Posted by Karellen View Post
I would say it is an issue with the CSS.

Can you scramble the ebook and upload?
The ebooks are my own stories that I've written over the years but they are not ready for release. While I'm competent at HTML, I'm not skilled when it comes to CSS, and if I tried to make changes I'd probably ruin the ebook. I know that HTML and CSS are related but their syntax is very different.
Solitaire1 is offline   Reply With Quote
Old 05-28-2026, 11:37 PM   #8
Solitaire1
Observant Owl
Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.
 
Solitaire1's Avatar
 
Posts: 15,205
Karma: 70503010
Join Date: Nov 2009
Device: NookColor, Nook Glowlight 4
Based on what I've discovered, I think some of it has to do with the software I'm using to make EPUB ebooks. I've noticed that commercial ebooks don't have the same issues I've had except for the centering text (although it is possible that is just the Formatter's choice). I'm coming to realize that the solution to the issues might be to get an application specifically designed for creating EPUB ebooks rather than using a more general-purpose application like a word processor. Thanks to everybody for the information.
Solitaire1 is offline   Reply With Quote
Old 05-28-2026, 11:44 PM   #9
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,833
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by Solitaire1 View Post
I will do so. Thanks for the information.

I thought one of the major advantages of EPUB (and an argument against PDF) is that you can adjust how the text will appear on your ereader. That was the major reason I decided to try EPUB again, along with not having to reformat my ebooks to adjust them to a new screen size.

I've been checking YouTube videos and found that there are a number of issues with the EPUB format, such as difficulty in displaying more than one font. Based on what I've seen, if my ebook reader supported it I might be better off using text files for my ebooks.
I have to opine that you are watching the wrong youtube videos. It also reveals a lack of understanding of epub. I've never come across a font limitation in epubs.

As an avid reader, reading on an iPhone, iPad, Libra2 and my PC, I would hate to buy an ebook to find I received a pdf. How would I read that on my iPhone on the train. The text would be so small it would be illegible... or I'd be constantly scrolling along lines and down the page. That is an atrocious end user experience.


Quote:
Originally Posted by Solitaire1 View Post
The ebooks are my own stories that I've written over the years but they are not ready for release. While I'm competent at HTML, I'm not skilled when it comes to CSS, and if I tried to make changes I'd probably ruin the ebook. I know that HTML and CSS are related but their syntax is very different.
Should I interpret that as a no?
You could always make a backup copy in case you "ruin the book".
Karellen is offline   Reply With Quote
Old Yesterday, 12:30 AM   #10
Solitaire1
Observant Owl
Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.
 
Solitaire1's Avatar
 
Posts: 15,205
Karma: 70503010
Join Date: Nov 2009
Device: NookColor, Nook Glowlight 4
Quote:
Originally Posted by Karellen View Post
I have to opine that you are watching the wrong youtube videos. It also reveals a lack of understanding of epub. I've never come across a font limitation in epubs.

As an avid reader, reading on an iPhone, iPad, Libra2 and my PC, I would hate to buy an ebook to find I received a pdf. How would I read that on my iPhone on the train. The text would be so small it would be illegible... or I'd be constantly scrolling along lines and down the page. That is an atrocious end user experience.



Should I interpret that as a no?
You could always make a backup copy in case you "ruin the book".
I may try that in the future just to see what happens when I try to edit an EPUB.
Solitaire1 is offline   Reply With Quote
Old Yesterday, 12:42 AM   #11
icearch
Groupie
icearch knows what time it isicearch knows what time it isicearch knows what time it isicearch knows what time it isicearch knows what time it isicearch knows what time it isicearch knows what time it isicearch knows what time it isicearch knows what time it isicearch knows what time it isicearch knows what time it is
 
Posts: 154
Karma: 2000
Join Date: Nov 2025
Device: none
From my own experience, auto converted things are all bad. You need to tear it down to make surgery your self.

And I don't think html and css are seperate things, they work together, making ebooks does not require professional coding knowledge.

And for text-oriented books, formatting can be really simple. If you don't want to install other software or leak your work, just use "edit book" in calibre and see the code, maybe just post the part you can't center up here.
icearch is online now   Reply With Quote
Old Yesterday, 01:38 AM   #12
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,824
Karma: 24222221
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Solitaire1 View Post
Any advice/guidance would be appreciated.
AFAIK, Nooks are very picky when it comes to stylesheets and won't use them if they contain errors or advanced features, e.g. @media queries.
I attached a sample file with a centered heading. If it displays fine on your Nook, rename your epub to zip, unpack it and attach all .css files.
Attached Files
File Type: epub centered_text.epub (2.5 KB, 2 views)
Doitsu is offline   Reply With Quote
Old Yesterday, 02:03 AM   #13
Solitaire1
Observant Owl
Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.
 
Solitaire1's Avatar
 
Posts: 15,205
Karma: 70503010
Join Date: Nov 2009
Device: NookColor, Nook Glowlight 4
Quote:
Originally Posted by icearch View Post
From my own experience, auto converted things are all bad. You need to tear it down to make surgery your self.

And I don't think html and css are seperate things, they work together, making ebooks does not require professional coding knowledge.

And for text-oriented books, formatting can be really simple. If you don't want to install other software or leak your work, just use "edit book" in calibre and see the code, maybe just post the part you can't center up here.
I did what you said about editing the book and it looks like the centering code is in the stylesheet.css, and it is displaying centered on Calibre's Ebook Viewer, it's just not displaying centered on my ereader. However, the EPUB produced by LibreOffice is basically one long string of text unless there are individual chapters. So I think my ereader is having trouble with the way that LibreOffice generates EPUBs. My ereader has none of the issues I mentioned with commercial ebooks and ebooks from Project Gutenberg.

I've thought about it and what I will do is create and post a test EPUB that shows the issue so that others can examine it.
Solitaire1 is offline   Reply With Quote
Old Yesterday, 02:11 AM   #14
Solitaire1
Observant Owl
Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.
 
Solitaire1's Avatar
 
Posts: 15,205
Karma: 70503010
Join Date: Nov 2009
Device: NookColor, Nook Glowlight 4
Quote:
Originally Posted by Doitsu View Post
AFAIK, Nooks are very picky when it comes to stylesheets and won't use them if they contain errors or advanced features, e.g. @media queries.
I attached a sample file with a centered heading. If it displays fine on your Nook, rename your epub to zip, unpack it and attach all .css files.
I loaded it and it displayed perfectly on my ereader, so I think it is an issue with the way that LibreOffice generates EPUBs.
Solitaire1 is offline   Reply With Quote
Old Yesterday, 02:43 AM   #15
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,833
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by Solitaire1 View Post
So I think my ereader is having trouble with the way that LibreOffice generates EPUBs.
Are you using Styles in LibreOffice? If not, then the styling and output/conversion is going to be messy.
Karellen is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Koreader 2019.08 doesn't center image due to text-align: center Norbi24 KOReader 7 08-29-2019 05:07 PM
How do you vertically center a text? Julius Caesar Workshop 9 09-08-2013 02:58 PM
How do you center text vertically? 44reader ePub 8 08-06-2012 01:52 PM
Center align text in epub virtual_ink ePub 23 08-31-2011 06:27 AM
Text becomes center-aligned when converting Alfy Calibre 12 01-19-2009 12:41 AM


All times are GMT -4. The time now is 09:46 AM.


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