Underline in text links, but not in image links

Is there any way that this CSS code of mine will work in a way that the dotted decoration for links will only work for texts, but not in images?

#content a {
	border-bottom: 1px dotted #666;
	text-decoration: none;

none underlined items within underlined parents

I am not a newbie but this is something I don't understand:

li {text-decoration:underline; color:blue}
li a {text-decoration:none; color:red}
 <li><a href="mysite.com">This is text</a></li>

According to the stylesheet, "This is text" should not be underlined. However, it IS underlined. This underline is blue, while the text is red, so you can see that this underline comes from li and not from a.

To make a long story short:

Is there a way to have none underlined items within underlined parents?

Syndicate content