How to do line breaks for long urls?

Raj
Raj
648 Points
26 Posts

I'm trying following css but not working:

{
    word-break: break-all;
}

Do we have any other way to do this?

Views: 342
Total Answered: 1
Total Marked As Answer: 1
Posted On: 27-Jan-2023 02:00

Share:   fb twitter linkedin
Answers
ykl
ykl
340 Points
17 Posts
         

Use hyphens to breaks from any hyphen. As in the urls there is no space available.

hyphens: auto;

Use following css class:

.break-any-thing {
  /* These are technically the same, but use both */
  overflow-wrap: break-word;
  word-wrap: break-word;

  word-break: break-word;

  /* Adds a hyphen where the word breaks, if supported (No Blink) */
  hyphens: auto;
}
Posted On: 27-Jan-2023 02:07
thanks.
 - Raj  20-Feb-2023 06:34
 Log In to Chat