> Hello,
> 
> the code would be something like <a href="foo.htm"><img src="foo"
> class="border"></a>
> 
> and I thought in CSS this would work:
> img.border a:link{border: 1px solid red}
> img.border a:hover{border: 3px solid red}
> but it doesn't.
> what would be the proper method here?

As the image is in the link and not the other way around the correct
selector would be
a:link img 
however, there is no need, as 
          a:link{border:1px solid red;}
          a:hover{border:3px solid red;}
<a href="foo.htm"><img src="foo" /></a>
does the trick.

If you want to use a class:

<a href="foo.htm" class="border"><img src="foo"></a>

          a:link.border{border:1px solid red;}
          a:hover.border{border:3px solid red;}

HTH 
Chris
-- 
Chris Heilmann 
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/  
Binaries: http://www.onlinetools.org/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to