[thelist] CSS blue border

David Dorward evolt at david.us-lot.org
Sat Feb 22 06:23:01 CST 2003


On Sat, Feb 22, 2003 at 11:03:46 -0000, Andrew Maynes wrote:
> I have a blue border appearing around an image link in E5.5 using

Images that are links get borders. The meaning and reasons are the
same as those for text that is a link getting an underline and colour
change.

The CSS border property can be used to suggest that borders are not displayed.

> <A HREF="index.php"><div id="diagonal"><img src="images/bb1.gif" width="80"
> height="79" alt=""></div></A>

This is invalid HTML. Some browsers will choke on it. You can not have
<div> elements inside <a> elements. And for a link, alt text of "" is
highly inapropriate. How can you have an element that is a link but
doesn't convey any meaning?

> #diagonal	{
> z-index: 1000;
> position: absolute;
> left: 0px; top: 0px;
> width: 80px;
> height: 69px}

> I tried putting in a class class="link" but the BB remains any ideas why this is
> happening?

Why would class="link" have any effect on a border? You haven't
defined any style for such a class.

Try:

<div id="diagonal">
 <a href="index.php">
  <img src="images/bb1.gif" width="80" height="79" alt="Some Meaning">
 </a>
</div>

Along with:

#diagonal {
  z-index: 1000;
  position: absolute;
  left: 0px; top: 0px;
  width: 80px; height: 69px
}

#diagonal img {
  border-style: none;
}

--
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