1

I don't want white spaces when the line is wrapped so i use white-space:no-wrap; but i want the text to wrap and not exceed the div

I don't want the word to be wrapped to the next line and leave a whitespace

Like look at the attached photo, i want the word "Knights" to stay on first line and the letters that don't fit then get pushed to the next line. How do I do this?enter image description here

Luqman
  • 127
  • 8
  • What exactly do you want? The word doesn't fit on that line. – user202729 Sep 30 '21 at 01:35
  • Justify? https://stackoverflow.com/questions/11287150/css-making-text-align-left-and-justify-at-same-time Or [html - How can I allow text to wrap inside a word if necessary? - Stack Overflow](https://stackoverflow.com/questions/2257657/how-can-i-allow-text-to-wrap-inside-a-word-if-necessary) ? – user202729 Sep 30 '21 at 01:36
  • I got the solution...what i wanted was to only cut off the letters that didn't fit but not shifting the whole word to another line – Luqman Sep 30 '21 at 04:03

1 Answers1

0

I found the solution.

white-space:normal;
word-break:break-all;

This is what i wanted to do: enter image description here

Luqman
  • 127
  • 8