CSS line wrapping

Posted by Mic on Stack Overflow See other posts from Stack Overflow or by Mic
Published on 2010-04-29T14:58:39Z Indexed on 2010/04/29 15:07 UTC
Read the original article Hit count: 298

Filed under:

Given a block container

<div>
 this is a very long string which contains a bunch of characters that I want to break at container edges.
</div>

are there any css properties I can set to force it to break when it reaches the container width, regardless of the contents of the string, for example a break like:

this is a ve
ry long stri
ng which ...

is pretty much what I want. Right now, it seems to always prefer to break at whitespace characters or other special characters (such as /).

© Stack Overflow or respective owner

Related posts about css