Forum:Hovered link style

I added a line in my CSS to have dotted border on hovered links.

But this also applies to images which are links! I didn't expect that so I tried
 * and

But none of them seemed working. How to avoid having border on images?


 * Images, even those that link to pages, shouldn't have a bottom border in the first place. You have an example of a wiki that does? Rappy 03:47, May 20, 2012 (UTC)


 * Sure. Please see this page and the CSS


 * Try this CSS instead of the original above: That would be better than adding the bottom border then trying to remove it only from images. Alternatively, (since .not is CSS3) you can add:  to your original CSS above. Just make sure this code is placed after the code adding the border to links. Rappy 04:40, May 20, 2012 (UTC)


 * I tried both of them separately then together but in both ways they aren't applied. Did I do something wrong?



Try this code: -- Sam Wang (talk) 05:25, May 20, 2012 (UTC)
 * Or how about this:


 * Sam Wang (talk) 05:27, May 20, 2012 (UTC)


 * Nope, I still have the border. I think normally these code must work, but what's happening here? :/

To my knowledge, "img" is not the correct CSS class, it's "image". That would explain why it didn't work when you tried .WikiaArticle a:not(.img):hover { border-bottom:#9DC425 1px dotted; text-decoration:none; } .WikiaArticle a.img:hover { border-bottom:none; } Try this: { border-bottom: #9dc425 1px dotted; text-decoration: none; } Works fine in Chrome and Firefox on my testing wiki, here.
 * 1) WikiaArticle a:not(.image):hover


 * You are absolutely right. Where did I find this img class? I watched too much Diablo3 stream this weekend, I might be getting tired. Thank you everybody, after all it did work.


 * My bad. I meant to type :not(.image) in my code above but somehow wrote :not(.class) o.0 Guess I am tired after all. Rappy 06:41, May 20, 2012 (UTC)