x
dustball
MSIE and image border colors for links

Here is the scenario:  You have an image as a link.  You want the image to have a border, but you want the border color to inherit the page's already defined style for links.  Firefox does this automatically.  If you have:

<a href="http://www.mindsay.com/news.html">
  <img border="1" src="news.gif">
</a>


Firefox will pretend the image is text more or less.  It will take the color of your A and apply it to the border color.  This even works for :hover as well.  Internet Explorer, however, will use the default blue for the border color.  Sure, you COULD override the color of the image border, but what if you don't know what color the page's links are?  You can solve the problem with CSS expressions:

<a href="http://www.mindsay.com/news.html">
  <img border="1" src="news.gif" style="border-color:

   expression(this.parentElement.currentStyle.color)">
</a>