Ray Dickman schrieb:
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}


I think what you mean to say is:
a:link img.border {border: 1px solid red}
a:hover img.border {border: 3px solid red}



Ray,

I know this complicates the matter, but may I note: your solution

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

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

does not work in IE6 due to a "specifity bug" [1].

-----

When you want such a construct to work in IE6 for some reasons, you'll have to explicitly declare a dummy-:hover-state in 2)

1) a:link img.border {border: 1px solid red}
2) a:hover {background-position: 0 0}
3) a:hover img.border {border: 3px solid red}

Without 2), IE6 does not know that there is a matched hover state for 3)
Any background change will do. Let IE know there is something going on.

And I am not getting tired in stating that you should give the image a height/width.

Ingo


[1] the "specifity bug" is of course only a thesis by me. Who knows what's actually driving this engine, I question if /they/ do.
______________________________________________________________________
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