Dennis Schwarts
Dennis Schwarts

Reputation: 45

How to add different icon for li list?

now how can i add my own img for a UI list (nav bar)? Im trying to add my own icon/imgs for each ul list

my current code:

<li><a href="#deliver"> <i class="fa fa-car"></i> אזורי חלוקה</a></li>

<a href="#"><img src="images/United-States-Flag-24.png" alt="US ENG" title="US English" /></a>

<li><a href="#contactus"> <i class="fa fa-envelope-o"></i> צור קשר</a></li>

<li><a href="#shop"><i class="fa fa-shopping-cart"></i> חנות</a></li>

Upvotes: 3

Views: 17650

Answers (1)

Quantico
Quantico

Reputation: 2436

Here is an example from the font awesome page: http://fortawesome.github.io/Font-Awesome/examples/ first your code above does not include the ul tag, not sure if you forgot it or did not include it

the use of <i> tags is right, but maybe you did not included the font awesome in your header?

try this example and see if you get the icons to appear. I can edit this base on your feedback

<ul class="fa-ul">
  <li><i class="fa-li fa fa-check-square"></i>List icons</li>
  <li><i class="fa-li fa fa-check-square"></i>can be used</li>
  <li><i class="fa-li fa fa-spinner fa-spin"></i>as bullets</li>
  <li><i class="fa-li fa fa-square"></i>in lists</li>
</ul>

Upvotes: 3

Related Questions