Looking at the Calibre Editor's "Live CSS" panel for a book I was recently editing, I couldn't figure out why no margin-bottom was being set. I moved up through my various CSS styles all the way to those for the basic paragraph (<p>). Apparently, back at the dawn of time, I forgot to put a unit (em) on margin-bottom for my standard paragraph formatting:
Code:
p {
/* Basic paragraph styling */
display: block;
margin-top: 0;
margin-bottom: 1; <-- note the lack of unit
text-indent: 1.2em;
Several questions:
- First, is there a default unit? I saw one post where someone claimed that the default unit is px. But, I can't find anything official. If that's true, that would imply I'd set my default paragraph bottom margin to 1px (essentially, zero). But, it's odd that margin-bottom didn't show up in the Live CSS panel.
- If there's no default unit, do the various readers just throw up their hands and say there's no defined bottom margin? Do they then default to some default bottom margin amount? Or do they just say it's undefined?
I ask the above because I didn't notice the problem for a long time since most of the time it all looked fine. I noticed differences between the Calibre Editor's preview pane, the Calibre Viewer and my Kobo Forma, but I chalked them up to the viewers just being different.
- I severely doubt this, but is there some easy way to change that single line of my CSS stylesheets across all my books?
- On a more theoretical side, should I specify margins like this down through lower level classes? For instance, I have div classes for things like notes, letters, poems and songs. Unless I had a pressing need for individual paragraphs space differently, I didn't specify anything for top/bottom margin. That way, if I changed the margins in the base paragraph it would (I assume) trickle down to lower level paragraphs. But, maybe I should force the styling in each class?
- And, since this has been bothering me for a while, is it "better" to have paragraph top and bottom margins like I theoretically did (all the margin at the bottom) or to split that same margin evenly across both top and bottom margins (i.e., instead of 0/1, should it be 0.5/0.5?)?