Use of IMG within a UL LI navigation menu list

I would like to have a menu list, used in a website navigation, where some of the menu items contain both text and an image to the right of the text:

<ul>
  <li>Nav item 1</li>
  <li>Nav item 2 <img src="image.gif" /></li>
</ul>

I'd like the menu items containing the image to be Text[space]Image in correct horizontal alignment.

Can anyone help by showing me the CSS that would achieve this?

Answers


ul li img {
padding-left: 20px;
}

Need Your Help

Can I make a function that accepts both ram and rom pointers in Microchip C18?

c pointers microcontroller pic

When I declare a function that accepts const char* and I pass a string literal, I get a

Defining a word in php

php html word

I`m a total newbie in php, so sorry for my simple question. Need to know step by step.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.