Format long text string using css
I have logn string which doesn't fit into table cell. Actually string is a single long word.
Is it p开发者_开发知识库ossible using css only to wrap such long word?
I have:
|klasdflksadjflsadkfj;lasdkfj;lsdkfjldskfjlsadkfj;lsdkfjklsajdf|
I want:
|klasdflksadjflsadkfj;lasdkfj;lsd|
|kfjldskfjlsadkfj;lsdkfjklsajdf |
you need:
word-wrap: break-word
in CSS3;
for a cross-browser solution you need to alter the text in the cell (with javascript) and add some breaks.
You can use word-wrap:break-word
according to caniuse.com this property has good browser support.
精彩评论