Quote:
Originally Posted by EricDP
My workaround is to create a centered block, and then inside that create an inline-block that is left aligned.
Problem: inline-blocks can't wrap pages (because they are treated as a single element).
Solution: create a separate block for each verse - hopefully your verses aren't too long.
New Problem: Using the above solution, each verse will now be centered relative to its own line lengths, not relative to the entire poem.
Solution: create a custom negative margin for each verse (except the widest, of course) to align the left edges of all the verses. If you specify this margin in "em" instead of "%" it will stay fairly close to aligned at different font sizes/different screen widths.
It's not perfect, but it's the best I can come up with given the current limitations.
If you want some sample code, I can post it later when I get home.
|
I would definitely like to see a sample of that.
Have you tried that on any ADE based ereader? I didn't think inline-block was supported in epubs. And how did you center the outside block without auto margins?
Troy