In Chrome, on a paragraph element,
text-align: justify;
works fine and creates a block alignment, but has no effect in Firefox or Safari. Any suggestions?
The text is justified by adding space between words (effectively varying word-spacing ), which is most appropriate for languages that separate words using spaces, like English or Korean.
The align attribute of <p> tag is used to justify the text on a web page. This can be done by assigning the value to the aligned attribute as justified.
If your text doesn't span more than one line, justifying doesn't do anything. Your text has to wrap to the next line, and then the FIRST line will be justified, but not the second.
Set the white-space
property to pre-line
. It will force to collapse into a single whitespace and the text will wrap on line breaks. This will help to block align:
white-space: pre-line;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With