Search code examples
htmlcssgoogle-chromecolorsborder

Border-Color Around Images in Chrome: Is this a bug?


I came across this strange behavior in Google Chrome recently (version 17.0):

I defined the border-color of the images using css, but chrome is overriding this with the visited link color in some cases. This does not match the behavior of other browsers as seen in this screenshot with chrome, safari, and firefox:

enter image description here

Live Example

Even stranger, when the first (unlinked) image is removed, chrome removes the purple border and behaves like the other browsers.

I looked in the developer panel to try to determine why chrome was applying the visited link color, but I didn't have any luck.

Is this just my issue, or could it be a bug with Chrome?


Solution

  • The problem did not exist in Chrome 16, but when I updated (on Win 7) to Chrome 17.0.963.26 beta-m, the problem appears in the Live Example demo. So this is apparently a bug in the beta version. Adding !important to the rule that sets the border seems to help. I suppose the bug is in the implementation of the cascade, making the default color for image links override the color specified in the page stylesheet,