Issue
I would like to limit the width of a block of text so it will look like it has br at the ned of each line.
Something like this:
Texttttttttttttttttttttt
tttttttttttttttttttttttt
tttttttttttttttttttttttt
From this:
Texttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
I have tried to specify the div's or p's width, but it didn't work for me. Any suggestions?
Solution
You can apply css like this:
div {
word-wrap: break-word;
width: 100px;
}
Usually browser does not break words, but word-wrap: break-word;
will force it to break words too.
Demo: http://jsfiddle.net/Mp7tc/
More info about word-wrap
Answered By - Viktor S.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.