Re: The valid W3C XHTML 1.0 png

Eric Nitzsche wrote:
> Add border="0" to the suggested image code.

The border attribute is deprecated, and it would not validate with a 
Strict DOCTYPE.  It is also completely unnecessary because CSS can quite 
easily achieve the same result

:link img { border: 0; }

> If you add border="0" and have an A:hover color in a document, that 
> color appears on the image under the right part of the check mark on a 
> mouseover.  At least it does with Firefox 1.0.2 on my Win2K box.
> Here's an example from one of my pages: 

That is the correct behaviour with that style rule applied.  However, 
this is slightly more difficult to handle, as you need to select <a> 
elements that contain <img> which cannot be done directly with CSS.  You 
could add a class to the link like this:

<a href="..." class="image"><img ... ></a>

then style it using:

.image:link:hover { background-color: transparent; }

Lachlan Hunt     Rediscover the Web Reclaim your Inbox

Received on Saturday, 2 April 2005 07:17:42 UTC