3

I have a book in .epub format (I will be converting it into .mobi after), and I need to change the text alignment to left everywhere.
I am aware of the text alignment feature in the book editor but from what I understand it only can change individual selected html elements, where I need to change the text alignment of around 200 full pages of text (not single lines/elements).

Preview: enter image description here

Does anyone knows a quick way to change the text alignment of all the text? Maybe I can do it during the conversion to .mobi but I don't know how.

  • You can try with a CSS style like this: body { text-align: left;} – Sekhemty Feb 28 '17 at 14:08
  • Thanks for reply! Do I have to do that individually to all 200 pages? Because that wouldn't be an option for me. – Vadim Tatarnikov Feb 28 '17 at 14:09
  • See my detailed answer – Sekhemty Feb 28 '17 at 14:30
2

You can use a CSS style to apply this formatting to all your text:

body {
    text-align: left;
}

This rule will be applied to all your text, so it will affect both regular paragraphs (<p> and <div>) and headings (<h1>, <h2> and so on).

If you just want to format "regular" text you could try to apply this styling just to <p>'s and see if it is sufficient:

p {
    text-align: left;
}

Of course, if some custom style is already present for these elements, you can just add the CSS properties to the existing selectors.

You must place this code inside the CSS stylesheet. Usually it is named stylesheet.css (but it can be different) and you can find it on the left "File Browser" panel under the "Styles" voice

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.