I have a listview (see photo below) that I would like to word wrap all the contents instead of adding ... to the long lines.
How is this done?
I have a listview (see photo below) that I would like to word wrap all the contents instead of adding ... to the long lines.
How is this done?
You just need to update the CSS for the
.ui-li-desc
element that holds the text in your list-item:Here is a demo: http://jsfiddle.net/Xc6PJ/
Some good documentation for
white-space
: https://developer.mozilla.org/en/CSS/white-spaceHere is a sample list-item from my test
listview
after jQuery Mobile has initialized it:In jQuery mobile 1.4.4 this worked:
My suggestion would be to use a Div within the
<li>
and set the specific behavior you want rather than changing the overall behavior of the the jquery mobile css. With this you can have only the specific thing to behave the way you want.Inside the
li
section add adiv
withstyle="white-space:normal;"
section which forces word-wrap.