[thelist] Link Style Specification

David Dorward evolt at david.us-lot.org
Fri Feb 28 03:43:03 CST 2003

On Thu, Feb 27, 2003 at 12:25:39 -0700, djinn at darkdesigns.org wrote:
> I knew about the border around images, but this border only appears because
> the image is a link - like text-decoration produces an underline when the
> text is a link. This whole thing is very counter-intuitive.
> And I still need to know why specifying my link colors doesn't also specify
> them for the image borders which are links.

It might not be intuitive, but it does make sense.

When images become links they gain a border.
When text becomes a link, the text changes colour.

The color property alters the colour of the text. Nothing in the spec
suggests that it should change the colour of anything else.

If you want to change the border around an image that is inside a link:

a:link img { border-color: #ffa; }

David Dorward                                   http://david.us-lot.org/
"You cannot rewrite history, not one line."
                                      - The Doctor (Dr. Who: The Aztecs)

More information about the thelist mailing list