Click here to Skip to main content
15,897,184 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hello everyone,

I am developing project in phonegap,I want to add custom icon (which is in my project folder) in li attribute of ul(Unorder list).I tried,google it but get confused and didnt getting required output.

Is there any steps to add custom icon ? If yes then tell me and any source code available then post too...???

Thanx in advanced..
Posted

1 solution

You can add custom icon without jQuery and it can be develop with css.

Here is some code for your query.

XML
<ul>
     <li><a href="photo_gallery.html">Photo Gallery</a></li>
     <li><a href="download.html">Download</a></li>
     <li><a href="enquiry.html">Enquiry</a></li>
</ul>


There is a some css trick for individual icon as well.
If you need sepreate icon on each li then you have to create another class as well.

CSS
.leftGreen li {
margin: 0 5px 0 0px;
padding: 2px 0 2px 30px;
background: url(../images/bullate.gif) no-repeat 0 7px;
border-bottom: #FFFFFF 1px dashed;
}



Bellow css is for new icon as per another icon
XML
<pre lang="css">.leftGreen li.new-icon {
margin: 0 5px 0 0px;
padding: 2px 0 2px 30px;
background: url(../images/new-bullate.gif) no-repeat 0 7px;
border-bottom: #FFFFFF 1px dashed;
}</pre>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900