View Full Version : Link hover effect problem

02-13-2011, 11:21 AM
Hi all

I have a small problem with controlling my hover effects for my links on a site I am making.

I have styled my a tags with so they display a dashed line by changing the border attribute when hovered over. I prefer using this instead of text-decoration attribute.

My problem is now that the same effect (obviously) takes place when hovering over an image which is also a link at the same time, can I can't get rid of it.

I have tried

img a:hover {



But that didn't work...

The (still unfinished) site is here www.stylewebsites.co.uk/donna-new (http://www.stylewebsites.co.uk/donna-new)

The problem is "download pdf" image under CV

I hope someone can help me...


/ dkgemini


02-13-2011, 11:43 AM
Hello dkgemini,
You just need to be more specific than that. Try #tab2 p a {border: none;} and see if that doesn't override your blanket a style.

See more about specificity here (http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/).