admin管理员组文章数量:1023758
I have this list:
<ul id="linksList"
data-role="listview"
data-inset="true"
data-filter="true">
<!-- Dynamic contents! -->
</ul>
It gets its data from a local XML file (RSS feed). All I want is for the titles to either wrap down or show more of the title within the buttons, as I have probably two thirds of the button left to fill with text.
Screenshot Link
Thank you for any help!
I have this list:
<ul id="linksList"
data-role="listview"
data-inset="true"
data-filter="true">
<!-- Dynamic contents! -->
</ul>
It gets its data from a local XML file (RSS feed). All I want is for the titles to either wrap down or show more of the title within the buttons, as I have probably two thirds of the button left to fill with text.
Screenshot Link
Thank you for any help!
Share Improve this question edited Sep 4, 2013 at 15:38 David Millar 1,8781 gold badge14 silver badges23 bronze badges asked Sep 4, 2013 at 15:24 CandiedMangoCandiedMango 2794 silver badges16 bronze badges 4- What else do you want? i shall edit with it – CandiedMango Commented Sep 4, 2013 at 15:28
- 1 Whatever it would take to rebuild your problem from scratch. Best if you could produce a working problem on jsfiddle. – Samuel Liew Commented Sep 4, 2013 at 15:30
- The problem is a fairly mon one where jQuery Mobile's base CSS strong-arms the list items into overflowing into ellipses. I've edited the OP with a bit more information on the subject, but a quick test in Firebug shows that my solution below should fix things. – David Millar Commented Sep 4, 2013 at 15:41
- Hi dave, i'm quite the novice to be honest with you. When putting your fix into a css file how would i reference my list? i.e would i just use the id? as i know there are special identifiers for jqms listviews and such – CandiedMango Commented Sep 4, 2013 at 15:45
3 Answers
Reset to default 4You need to override the jQuery Mobile default of showing ellipsis for the elements you want to have wrap:
overflow:hidden;
text-overflow:ellipsis;
white-space: nowrap;
bees:
overflow: visible;
text-overflow: clip;
white-space: normal;
I remend doing this on an as-needed basis using your own classes rather than modifying the base code.
I didn't have to change text-overflow. also.. I added in the class names. Copy and paste the following:
.ui-li-heading, .ui-li-desc {
overflow: visible;
white-space: normal;
}
The ellipses are caused by jQuery mobile setting widths and setting the overflow to ellipses. You would need to go into the CSS on the item and set the margins to use less space.
I have this list:
<ul id="linksList"
data-role="listview"
data-inset="true"
data-filter="true">
<!-- Dynamic contents! -->
</ul>
It gets its data from a local XML file (RSS feed). All I want is for the titles to either wrap down or show more of the title within the buttons, as I have probably two thirds of the button left to fill with text.
Screenshot Link
Thank you for any help!
I have this list:
<ul id="linksList"
data-role="listview"
data-inset="true"
data-filter="true">
<!-- Dynamic contents! -->
</ul>
It gets its data from a local XML file (RSS feed). All I want is for the titles to either wrap down or show more of the title within the buttons, as I have probably two thirds of the button left to fill with text.
Screenshot Link
Thank you for any help!
Share Improve this question edited Sep 4, 2013 at 15:38 David Millar 1,8781 gold badge14 silver badges23 bronze badges asked Sep 4, 2013 at 15:24 CandiedMangoCandiedMango 2794 silver badges16 bronze badges 4- What else do you want? i shall edit with it – CandiedMango Commented Sep 4, 2013 at 15:28
- 1 Whatever it would take to rebuild your problem from scratch. Best if you could produce a working problem on jsfiddle. – Samuel Liew Commented Sep 4, 2013 at 15:30
- The problem is a fairly mon one where jQuery Mobile's base CSS strong-arms the list items into overflowing into ellipses. I've edited the OP with a bit more information on the subject, but a quick test in Firebug shows that my solution below should fix things. – David Millar Commented Sep 4, 2013 at 15:41
- Hi dave, i'm quite the novice to be honest with you. When putting your fix into a css file how would i reference my list? i.e would i just use the id? as i know there are special identifiers for jqms listviews and such – CandiedMango Commented Sep 4, 2013 at 15:45
3 Answers
Reset to default 4You need to override the jQuery Mobile default of showing ellipsis for the elements you want to have wrap:
overflow:hidden;
text-overflow:ellipsis;
white-space: nowrap;
bees:
overflow: visible;
text-overflow: clip;
white-space: normal;
I remend doing this on an as-needed basis using your own classes rather than modifying the base code.
I didn't have to change text-overflow. also.. I added in the class names. Copy and paste the following:
.ui-li-heading, .ui-li-desc {
overflow: visible;
white-space: normal;
}
The ellipses are caused by jQuery mobile setting widths and setting the overflow to ellipses. You would need to go into the CSS on the item and set the margins to use less space.
本文标签: javascriptIn jQuery Mobilehow do I stop list items being cut off with ellipsesStack Overflow
版权声明:本文标题:javascript - In jQuery Mobile, how do I stop list items being cut off with ellipses? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745518585a2154205.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论