John Doe
John Doe

Reputation: 3691

How can you break text that is really long?

I am not quite sure how to do this.

I'm trying to break up text that is too long. (E.g. hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)

I've tried using word-wrap: break-word; but this isn't doing anything.

Upvotes: 1

Views: 240

Answers (2)

drublic
drublic

Reputation: 993

word-break was now renamed to overflow-wrap as you can read in the spec. But browsers should accept the word-break rule.

You can also try to play around with text-overflow a litte bit. PPK wrote about it here and you can find more about it on MDN.

Upvotes: 2

Jason Barry
Jason Barry

Reputation: 758

Check out the -webkit-hyphens css3 property. There is support for some other vendor prefixes as well.

http://drublic.de/blog/css3-auto-hyphenation-for-text-elements/

Upvotes: 1

Related Questions