Hey I have a clickable icon on the right and my text is overflowing it. How do I fix it ?
Codepen.io example: http://codepen.io/anon/pen/XmPmba
image:
code:
<ons-list-item modifier="tappable" ng-repeat="x in results" style="white-space: nowrap;"> <ons-row> <ons-col> {{ x.title }} </ons-col> <ons-col width="40px"> <ons-icon icon="fa-ellipsis-h" size="22px" style="background-color:red"></ons-icon> </ons-col> </ons-row> </ons-list-item>
You should set a width width
property and then set overflow:hidden
. Like this
<ons-list-item modifier="tappable" ng-repeat="x in results" style="white-space: nowrap;">
<ons-row>
<ons-col style="width:80px;overflow:hidden;">
{{ x.title }}
</ons-col>
<ons-col width="40px">
<ons-icon icon="fa-ellipsis-h" size="22px" style="background-color:red"></ons-icon>
</ons-col>
</ons-row>
</ons-list-item>
change the value of width according to your need.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.