I'll be #3 to mirror that sentiment.
Using code like this:
Code: Select all
<a href = "mytest">test</a>
<a href = "mytest"><img src = "fnarf.gif"></a>
There's no way I know of to tell "test" to be underlined, but the image to not be.
You're going to have to add a class to the <a> tag around an image.
Also in your CSS for the
a:hover img element, text-decoration would have no effect on whether the image is underlined or not. Like ~califdon said, the action & styles are applied to the <a> element regardless of what child elements they contain. So, strictly speaking, the image is never underlined, the link is & the image just happens to be inside the link.
It's also preferred that you use the [_syntax="css"][_/syntax] (without the underscores - had to put them in there so they wouldn't get parsed) when posting CSS.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.