View Single Post
Old 05-15-2024, 09:27 AM   #24
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,830
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by lucie View Post
Thanks so much this as really helpful... though unfortunatly I couldn't get it to work.

So in the end I just did a top margin of 50% and centred the text, which seems to work ok, not perfect, but better than it was.
Where it doesn't work? On Kindle? On epub2? On epub3? There is something you are not doing well. If you want a single page with some text centered vertical and horizontally, you have the following methods:

1. On epub2:
a) By using a table
b) By using a svg wrapper

2. On epub3
a) By using the property display: flex

If your epub is a epub2 and the table method is not working for you (I can't understand why, because the answer by Turtle91 should work fine) then employ a svg wrapper: it can't fail if the device supports svg (Kindle supports it).

Quote:
So in the end I just did a top margin of 50%
If you were able to set a margin-top of 50%, then the table method should work for you; you're doing something wrong. By the way, what happens when you change the font size?
RbnJrg is offline   Reply With Quote