EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Pierre on August 30, 2017, 12:24:32 PM



Title: [SOLVED] Data-list icon
Post by: Pierre on August 30, 2017, 12:24:32 PM
Hello
I try to put small image/icon into data-list link, something like:
Code:
<li><img class="list-image" src="/icons/user1.png"/><a href="javascript:void(0)" class="datalist-link">Green Adult</a></li>
but data-list text is moved to new row (see image).
Here is second try (second link):
Code:
<li><div class="m-left"><img src="/css/icons/user_red.png"/></div><a href="javascript:void(0)" class="datalist-link">Green Adult</a></li>
and this is a bit better but icon is not centered.
How to add centered icon before data-list text, please?
Thank you


Title: Re: Data-list icon
Post by: stworthy on August 31, 2017, 05:15:47 AM
Try to use this code instead.
Code:
<li>
<a href="javascript:void(0)" class="datalist-link">
<img src="" style="width:16px;height:16px;vertical-align:middle;margin-right:6px">Rattleless
</a>
</li>


Title: Re: Data-list icon
Post by: Pierre on August 31, 2017, 05:45:19 AM
Works perfect, thank you very much.