Click to See Complete Forum and Search --> : Blue frame around the link inage


valross
10-21-2003, 07:38 AM
When I use images as links they get a blue frame, like text links get a blue underline. I would like to remove this blue frame but I don't know how to do it.

I've tried using CSS and text decoration:none but it seems to apply only to text links.

I would prefer to use style sheets but any help is of course welcome.

The homepage is lugnet.valross.net (http://lugnet.valross.net) and it's the blue buttons on the left (Intressen, Om lugnet, Datormodding, Länkar).

Many thanks in advance.

requestcode
10-21-2003, 08:34 AM
Do you mean something like this:
<html>
<head>
<title>Image CSS Test</title>
<style>
IMG {border:0}
</style>
</head>
<body>
<a href="page1.html"><img src="0.gif"></a>
</body>
</html>

valross
10-21-2003, 09:37 AM
EXCELLENT!!

Many thanks

Daria
10-21-2003, 11:25 AM
You can also set individual image border, as such:

<img src="0.gif" border="0"></a>

valross
10-22-2003, 05:58 AM
Cool. Thank you.

Charles
10-22-2003, 06:25 AM
Originally posted by requestcode
Do you mean something like this:
<html>
<head>
<title>Image CSS Test</title>
<style>
IMG {border:0}
</style>
</head>
<body>
<a href="page1.html"><img src="0.gif"></a>
</body>
</html> That's invalid on quite a number of accounts.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example</title>

<style type="text/css">
<!--
img {border:0}
-->
</style>

<div><a href="http://www.w3.org/"><img alt="W3C" src="http://www.w3.org/Icons/w3c_home"></a></div>