Answers.Body: <p>You can use a CSS style to apply this formatting to all your text:</p>
  
  <pre><code>body {
      text-align: left;
  }
  </code></pre>
  
  <p>This rule will be applied to <em>all</em> your text, so it will affect both regular paragraphs (<code>&lt;p&gt;</code> and <code>&lt;div&gt;</code>) and headings (<code>&lt;h1&gt;</code>, <code>&lt;h2&gt;</code> and so on).</p>
  
  <p>If you just want to format "regular" text you could try to apply this styling just to <code>&lt;p&gt;</code>'s and see if it is sufficient:</p>
  
  <pre><code>p {
      text-align: left;
  }
  </code></pre>
  
  <p>Of course, if some custom style is already present for these elements, you can just add the CSS properties to the existing selectors.</p>
  
  <p>You must place this code inside the CSS stylesheet. Usually it is named <code>stylesheet.css</code> (but it can be different) and you can find it on the left "File Browser" panel under the "Styles" voice</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-28T14:28:14.680Z
Answers.LastActivityDate: 2017-02-28T14:28:14.680Z
Answers.UserDisplayName: Sekhemty
Answers.Body: <p>This is the only thing which works for me. Put in Styles section of Preferences</p>
  <pre><code>.bold {
       font-weight: bold 
  }
   .calibre {
       display: block;
       font-size: 1em;
       margin-bottom: 0;
       margin-left: 5pt;
       margin-right: 5pt;
       margin-top: 0;
       padding-left: 0;
       padding-right: 0;
       text-align: left 
  }
   .calibre1 {
       display: block 
  }
   .calibre10 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 16px;
       text-align: center;
       text-indent: 0 
  }
   .calibre11 {
       display: block;
       height: 16px 
  }
   .calibre12 {
       display: block;
       margin-bottom: 0;
       margin-left: 2em;
       margin-right: 0;
       margin-top: 0;
       text-indent: 0 
  }
   .calibre13 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 16px;
       text-align: left;
       text-indent: 0 
  }
   .calibre14 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 8px;
       text-align: right;
       text-indent: 0 
  }
   .calibre15 {
       font-size: 0.75em 
  }
   .calibre16 {
       display: block;
       height: 24px 
  }
   .calibre17 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 1em;
       text-align: left;
       text-indent: 0 
  }
   .calibre18 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 8px;
       text-align: left;
       text-indent: 0 
  }
   .calibre19 {
       font-size: 1.66667em;
       line-height: 1.2 
  }
   .calibre2 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 1em;
       text-align: center;
       text-indent: 0 
  }
   .calibre20 {
       display: block;
       height: 3em 
  }
   .calibre21 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 4px;
       text-align: left;
       text-indent: 0 
  }
   .calibre22 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 4px;
       text-align: left;
       text-indent: 1em 
  }
   .calibre23 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: left;
       text-indent: 0 
  }
   .calibre24 {
       display: block;
       height: 2em 
  }
   .calibre25 {
       display: block;
       margin-bottom: 0;
       margin-left: 1em;
       margin-right: 0;
       margin-top: 13px;
       text-align: left;
       text-indent: -1em 
  }
   .calibre26 {
       display: block;
       margin-bottom: 0;
       margin-left: 2em;
       margin-right: 0;
       margin-top: 0 
  }
   .calibre27 {
       display: block;
       margin-bottom: 0;
       margin-left: 16px;
       margin-right: 0;
       margin-top: 8px;
       text-align: left;
       text-indent: -16px 
  }
   .calibre28 {
       font-family: sans-serif;
       font-size: 0.75em 
  }
   .calibre29 {
       display: block;
       margin-bottom: 0;
       margin-left: 24px;
       margin-right: 0;
       margin-top: 13px;
       text-align: left;
       text-indent: -24px 
  }
   .calibre3 {
       font-size: 1em 
  }
   .calibre30 {
       font-size: 0.75em;
       line-height: normal;
       vertical-align: super 
  }
   .calibre31 {
       display: block;
       margin-bottom: 0;
       margin-left: 24px;
       margin-right: 0;
       margin-top: 24px;
       text-align: left;
       text-indent: -24px 
  }
   .calibre32 {
       font-family: sans-serif;
       font-size: 1.125em;
       line-height: 1.2 
  }
   .calibre33 {
       display: block;
       height: 8px 
  }
   .calibre34 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 20px;
       text-align: left;
       text-indent: 0 
  }
   .calibre35 {
       display: block;
       height: 20px 
  }
   .calibre36 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 64px;
       text-align: left;
       text-indent: 0 
  }
   .calibre37 {
       display: block;
       margin-bottom: 0;
       margin-left: 2em;
       margin-right: 0;
       margin-top: 0;
       text-indent: 1em 
  }
   .calibre38 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: left;
       text-indent: 1em 
  }
   .calibre39 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: center;
       text-indent: 8px 
  }
   .calibre4 {
       height: auto;
       width: auto 
  }
   .calibre40 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 1em;
       text-align: left;
       text-indent: 0 
  }
   .calibre41 {
       font-size: 0.75em;
       line-height: normal;
       vertical-align: sub 
  }
   .calibre42 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: left;
       text-indent: 0 
  }
   .calibre43 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 3em;
       text-align: left;
       text-indent: 0 
  }
   .calibre44 {
       font-family: sans-serif;
       font-size: 1em 
  }
   .calibre45 {
       display: block;
       height: 4em 
  }
   .calibre46 {
       display: block;
       margin-bottom: 0;
       margin-left: 1em;
       margin-right: 0;
       margin-top: 4px;
       text-align: left;
       text-indent: -1em 
  }
   .calibre47 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: left;
       text-indent: 2em 
  }
   .calibre48 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 2em;
       text-align: left;
       text-indent: 0 
  }
   .calibre49 {
       display: block;
       margin-bottom: 0;
       margin-left: 24px;
       margin-right: 0;
       margin-top: 4px;
       text-align: left;
       text-indent: -24px 
  }
   .calibre5 {
       display: block;
       height: 1em 
  }
   .calibre50 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: right;
       text-indent: 1em 
  }
   .calibre51 {
       font-size: 1.125em;
       line-height: 1.2 
  }
   .calibre6 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 96px;
       text-align: center;
       text-indent: 0 
  }
   .calibre7 {
       font-size: 1.41667em;
       line-height: 1.2 
  }
   .calibre8 {
       display: block;
       height: 4px 
  }
   .calibre9 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 64px;
       text-align: center;
       text-indent: 0 
  }
   .italic {
       font-style: italic 
  }
   .mbppagebreak {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0 
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-17T22:00:20.947Z
Answers.LastActivityDate: 2022-04-23T13:44:50.903Z
Answers.LastEditDate: 2022-04-23T13:44:50.903Z
Answers.UserDisplayName: tom arnall
Answers.Body: <p>Nothing worse than having to read a book where sentence alignment within a paragraph is &quot;Justified&quot;. There is no feature in Calibre to automatically change paragraphs from &quot;Justify&quot; to &quot;Left&quot;.  My solution is to simply delete all style sheets and then run &quot;Remove Unused CSS Rules&quot; followed by &quot;Check Book&quot; to clean up.  You will have a lighter and faster epub book.  A more conservative solution is to make active the main css sheet and do a search and replace all replacing &quot;justify&quot; with &quot;left&quot; then run &quot;Remove Unused CSS Rules&quot; followed by &quot;Check Book&quot; to clean up.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-22T12:21:29.000Z
Answers.LastActivityDate: 2024-07-22T12:21:29.000Z
Answers.UserDisplayName: brett
Body: <p>I have a book in <code>.epub</code> format (I will be converting it into <code>.mobi</code> after), and I need to change the text alignment to left everywhere.<br>
  I am aware of the <em>text alignment</em> feature in the <em>book editor</em> 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).</p>
  
  <p>Preview: <a href="https://i.sstatic.net/xPzrN.png" rel="noreferrer"><img src="https://i.sstatic.net/xPzrN.png" alt="enter image description here"></a></p>
  
  <p>Does anyone knows a quick way to change the text alignment of all the text? Maybe I can do it during the conversion to <code>.mobi</code> but I don't know how.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-28T14:08:15.287Z
Comments.Text: You can try with a CSS style like this: `body { text-align: left;}`
Comments.UserDisplayName: Sekhemty
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-28T14:09:46.097Z
Comments.Text: Thanks for reply! Do I have to do that individually to all 200 pages? Because that wouldn't be an option for me.
Comments.UserDisplayName: John Smith
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-28T14:30:01.027Z
Comments.Text: See my detailed answer
Comments.UserDisplayName: Sekhemty
Tags: <epub><calibre><conversion><mobi><editing>
Title: How to change text alignment with Calibre book editor
UserDisplayName: John Smith
ThreadText: # How to change text alignment with Calibre book editor
  
  (Asked by: username_0 on 2017-02-28)
  
  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](https://i.sstatic.net/xPzrN.png)](https://i.sstatic.net/xPzrN.png)
  
  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.
  
  **Tags:** epub, calibre, conversion, mobi, editing
  
  > **Comments:**
  > **username_1**: You can try with a CSS style like this: `body { text-align: left;}`  
  > **username_0**: Thanks for reply! Do I have to do that individually to all 200 pages? Because that wouldn't be an option for me.  
  > **username_1**: See my detailed answer  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2017-02-28. Score: 5 | Accepted answer
  
  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
  
  
  ---
  
  ### Answer by username_2 on 2022-04-17. Score: 0
  
  This is the only thing which works for me. Put in Styles section of Preferences
  
  ```
  .bold {
       font-weight: bold 
  }
   .calibre {
       display: block;
       font-size: 1em;
       margin-bottom: 0;
       margin-left: 5pt;
       margin-right: 5pt;
       margin-top: 0;
       padding-left: 0;
       padding-right: 0;
       text-align: left 
  }
   .calibre1 {
       display: block 
  }
   .calibre10 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 16px;
       text-align: center;
       text-indent: 0 
  }
   .calibre11 {
       display: block;
       height: 16px 
  }
   .calibre12 {
       display: block;
       margin-bottom: 0;
       margin-left: 2em;
       margin-right: 0;
       margin-top: 0;
       text-indent: 0 
  }
   .calibre13 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 16px;
       text-align: left;
       text-indent: 0 
  }
   .calibre14 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 8px;
       text-align: right;
       text-indent: 0 
  }
   .calibre15 {
       font-size: 0.75em 
  }
   .calibre16 {
       display: block;
       height: 24px 
  }
   .calibre17 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 1em;
       text-align: left;
       text-indent: 0 
  }
   .calibre18 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 8px;
       text-align: left;
       text-indent: 0 
  }
   .calibre19 {
       font-size: 1.66667em;
       line-height: 1.2 
  }
   .calibre2 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 1em;
       text-align: center;
       text-indent: 0 
  }
   .calibre20 {
       display: block;
       height: 3em 
  }
   .calibre21 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 4px;
       text-align: left;
       text-indent: 0 
  }
   .calibre22 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 4px;
       text-align: left;
       text-indent: 1em 
  }
   .calibre23 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: left;
       text-indent: 0 
  }
   .calibre24 {
       display: block;
       height: 2em 
  }
   .calibre25 {
       display: block;
       margin-bottom: 0;
       margin-left: 1em;
       margin-right: 0;
       margin-top: 13px;
       text-align: left;
       text-indent: -1em 
  }
   .calibre26 {
       display: block;
       margin-bottom: 0;
       margin-left: 2em;
       margin-right: 0;
       margin-top: 0 
  }
   .calibre27 {
       display: block;
       margin-bottom: 0;
       margin-left: 16px;
       margin-right: 0;
       margin-top: 8px;
       text-align: left;
       text-indent: -16px 
  }
   .calibre28 {
       font-family: sans-serif;
       font-size: 0.75em 
  }
   .calibre29 {
       display: block;
       margin-bottom: 0;
       margin-left: 24px;
       margin-right: 0;
       margin-top: 13px;
       text-align: left;
       text-indent: -24px 
  }
   .calibre3 {
       font-size: 1em 
  }
   .calibre30 {
       font-size: 0.75em;
       line-height: normal;
       vertical-align: super 
  }
   .calibre31 {
       display: block;
       margin-bottom: 0;
       margin-left: 24px;
       margin-right: 0;
       margin-top: 24px;
       text-align: left;
       text-indent: -24px 
  }
   .calibre32 {
       font-family: sans-serif;
       font-size: 1.125em;
       line-height: 1.2 
  }
   .calibre33 {
       display: block;
       height: 8px 
  }
   .calibre34 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 20px;
       text-align: left;
       text-indent: 0 
  }
   .calibre35 {
       display: block;
       height: 20px 
  }
   .calibre36 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 64px;
       text-align: left;
       text-indent: 0 
  }
   .calibre37 {
       display: block;
       margin-bottom: 0;
       margin-left: 2em;
       margin-right: 0;
       margin-top: 0;
       text-indent: 1em 
  }
   .calibre38 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: left;
       text-indent: 1em 
  }
   .calibre39 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: center;
       text-indent: 8px 
  }
   .calibre4 {
       height: auto;
       width: auto 
  }
   .calibre40 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 1em;
       text-align: left;
       text-indent: 0 
  }
   .calibre41 {
       font-size: 0.75em;
       line-height: normal;
       vertical-align: sub 
  }
   .calibre42 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: left;
       text-indent: 0 
  }
   .calibre43 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 3em;
       text-align: left;
       text-indent: 0 
  }
   .calibre44 {
       font-family: sans-serif;
       font-size: 1em 
  }
   .calibre45 {
       display: block;
       height: 4em 
  }
   .calibre46 {
       display: block;
       margin-bottom: 0;
       margin-left: 1em;
       margin-right: 0;
       margin-top: 4px;
       text-align: left;
       text-indent: -1em 
  }
   .calibre47 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: left;
       text-indent: 2em 
  }
   .calibre48 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 2em;
       text-align: left;
       text-indent: 0 
  }
   .calibre49 {
       display: block;
       margin-bottom: 0;
       margin-left: 24px;
       margin-right: 0;
       margin-top: 4px;
       text-align: left;
       text-indent: -24px 
  }
   .calibre5 {
       display: block;
       height: 1em 
  }
   .calibre50 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0;
       text-align: right;
       text-indent: 1em 
  }
   .calibre51 {
       font-size: 1.125em;
       line-height: 1.2 
  }
   .calibre6 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 96px;
       text-align: center;
       text-indent: 0 
  }
   .calibre7 {
       font-size: 1.41667em;
       line-height: 1.2 
  }
   .calibre8 {
       display: block;
       height: 4px 
  }
   .calibre9 {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 64px;
       text-align: center;
       text-indent: 0 
  }
   .italic {
       font-style: italic 
  }
   .mbppagebreak {
       display: block;
       margin-bottom: 0;
       margin-left: 0;
       margin-right: 0;
       margin-top: 0 
  }
  
  ```
  
  
  ---
  
  ### Answer by username_3 on 2024-07-22. Score: 0
  
  Nothing worse than having to read a book where sentence alignment within a paragraph is "Justified". There is no feature in Calibre to automatically change paragraphs from "Justify" to "Left". My solution is to simply delete all style sheets and then run "Remove Unused CSS Rules" followed by "Check Book" to clean up. You will have a lighter and faster epub book. A more conservative solution is to make active the main css sheet and do a search and replace all replacing "justify" with "left" then run "Remove Unused CSS Rules" followed by "Check Book" to clean up.
  
  
  ---
  
  