2

Using Calibre I have tried to use ´text-align: left´ in CSS but viewing the resulting epub-file with iBooks the result is still justified text. How can I change to left alignment?enter image description here

Dan
  • 21
  • 3
  • Do you have "Justify text" turned on in iBooks -> Preferences -> General? That will override the CSS settings. – beaker Oct 28 '18 at 15:54

1 Answers1

2

I don't think text-align left and Justify text have anything to do with one another. Justification is usually controlled by the reading system, while text-align left is the default behavior for text. The css property text-align mainly has to do with alignment inside of a box (usually a single line). You could use another css property to scoot the text to the left or the right (margin, etc).

idiotprogrammer
  • 4,564
  • 12
  • 26
  • `text-align` does indeed distinguish `left` and `justify` ([MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align)). It is more likely a default setting is overriding this directive. More specificity ([MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity)) may override the default setting, would need to test. – rgchris Nov 13 '18 at 15:24