IE CSS behavior

Peter C. Gorman pgorman at library.wisc.edu
Thu Jan 27 14:11:21 EST 2000


Hello,

I've run into some odd behavior with IE's handling of CSS, and I 
wonder if anyone's found a workaround. The problem is that IE (4.5 
Mac, 5.01 NT) does not use the CSS-defined link color for anchors 
around images. In the following, the textual parts of the links are 
colored correctly, but the image border is the browser's default link 
color. Putting the color in a style attribute in the opening tag does 
not help. Any ideas? I know I could probably force the color with the 
markup, but I really want to keep this in CSS, where it belongs.

Netscape 4.x has no problem with this - it's the first case I've seen 
of Netscape doing something in CSS better than IE does.


<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>title</title>
<style type="text/css">
<!--
a:link     { color: #155424 }
a:visited  { color: #9f0e00 }
a:active   { color: #000000 }
-->
</style>
</head>

<body>

<a href="foo"><img src="myimage.jpg" alt="image"> with some text</a><br>
<a href="foo">some more text</a>

</body>
</html>

Thanks for your help,
_______________________________
Peter C. Gorman
Senior Technology Librarian
University of Wisconsin-Madison
Library Technology Group
pgorman at library.wisc.edu
(608) 265-5291

What's the difference between fiddle players and government bonds?
Government bonds eventually mature and earn money.


More information about the Web4lib mailing list