View Single Post
Old 04-15-2022, 11:44 AM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,228
Karma: 148951761
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by slowsmile View Post
There are two ways to fix that problem. For the first way, just export your ODT doc to Word doc format and then convert the Word doc to epub format. In epub format you could then write a simple style for the CSS in Sigil like this:

p.center {
text-align: center;
}

Use the above style within HTML images like this:

Code:
<p class='center'>
    <img alt="img01" src="../Images/Title_Image.jpg">
</p>
The second way to quickly center each of your epub images in Sigil would be to click and highlight each image in the Sigil html editor in turn and then just click the 'Align Text Center' button in the Sigil Toolbar.
You left out the indent. I had to remove the p as I cannot stand p. CSS styles. You need the indent to be 0 because p should be the default for most paragraphs and that includes the indent.

Code:
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
}
.center  {
  text-align: center;
  text-indent: 0;
}

Last edited by JSWolf; 04-15-2022 at 11:57 AM.
JSWolf is online now   Reply With Quote