I’m facing an issue with the text align it’s not working probably , there is too much space between letters as per below screenshot. any advice on how to fix that ?
I’m using the following style:
Text-align: Justify.
I’m facing an issue with the text align it’s not working probably , there is too much space between letters as per below screenshot. any advice on how to fix that ?
I’m using the following style:
Text-align: Justify.
3
Answers
You can influence it a little with word-spacing:
This is the task of justify.
The common denominator here is the next word after the line with large spacing, where this is a long word.
What justify will do is to set every row to 100% of its container and justify the space between each word.
The choices you have for
text-align
will beleft
,right
,center
andjustify
.You will need to be using some of the other choices here to fix the "issue" you are referring to.
You could also hyphen words if you want to.
The other two answers are completely right.
But there is another approach:
You could use
­
for long words (egautho­rity
) so the space is equally distributed. The css-rulehyphen
does this automatically but you need to distribute the lang-attribute in your -Tag (<html lang="en">
) More information how to use that rule, can be found here: Stack Overflow: css break word with hyphenAlternative just use
text-align: left
, personally I’m not a fan of block-text 😉