View Single Post
Old 09-29-2012, 08:57 PM   #1
naisren
Enthusiast
naisren began at the beginning.
 
Posts: 38
Karma: 12
Join Date: Jul 2009
Device: ppc
Calibre has no choice on font size unit in css?

During conversion from a recipe or an ebook to an epub, I found in all the rendered css files the font size just uses em unit, like .calibre {...font-size: 1em...}, which gives style to <body> tag in a point of fact.

When I open these epubs with Mantato ereader and the font size is very big, I have to decrease the size again and again.

To solve the problem, I tried many ways to change my extra css in the recipe, no good results at all.

After hard study, I guessed the problem is the em unit in the .calibre element, and you'll find the font size becomes normal after a change from em to % in the converted epubs as the belows, no need to edit other em in the css, just the .calibre.

Origin
.calibre {
display: block;
font-size: 1em;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
page-break-before: always;
text-align: left
}

Change
.calibre {
display: block;
font-size: 80%;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
page-break-before: always;
text-align: left
}

Because the Calibre converter has no choice for the unit, and I wish there would be such a unit or % choice there.
naisren is offline   Reply With Quote