Quote:
Originally Posted by twowheels
OK, I figured it out by cloning the github repo and looking through the css files.
In epub.css (unlike html5.css) I found this:
Code:
/* Block elements */
p {
text-indent: 1.2em;
margin-top: 0;
margin-bottom: 0;
}
So, it seems that it's text-indent that's causing it. So, I put in a book-specific style tweak that says:
Code:
p.center {
text-indent: 0;
}
...and it's now properly centered.
I'm wondering whether this is something that should be in the global css file, or whether the text-indent should be removed from the global paragraph style -- I mean, coolreader base already handles margins, right?
As a follow-up test, as I was typing this, I changed the above p.center to just p in my book-specific style tweak and the dots stayed centered and I didn't see any change to the margins, so I'm even more inclined to believe that the text-indent should just be removed from the global paragraph style.
|
That's not correct. you would lose indents for <p> and that means you would need to do <p class="somedumbuneededclass"> to get indents. It's best to just use <p>. Every class with a center should have a text indent of 0. It's good programming.