I have a Word document with story, about 5 pages long. The task is to implement this story on a website.
#reading {
hyphens: auto;
text-align: justify
}
<div style="font-size: 20px; width: 750px; margin-bottom: 4em;" class="reading" id="reading">
TextTextText<br> TextTextText
<br> TextTextText
</div>
Conditions for the text:
- it should have the exact same line breaks like in the word document
- justify all lines
- I cannot use span elements because of a script which runs over the text
Problem:
- line break and text-align: justify do not work together.
I tried also putting the div
width on the same level as in the Word document. The line breaks are ok for the first 20 lines, before they start to move slightly.
Question:
Is there a way to create manual line breaks and still keep text-align justify
?
is the last line before the
. See the linked question, or, just test it by adding `text-align-last:justify;` to your css. – Mr Lister Jan 14 '20 at 09:46