Click to See Complete Forum and Search --> : [RESOLVED] What's wrong with this code?


jihanemo
07-23-2007, 07:39 PM
Why does the "home" link from the following link turn out to be pink when it should be black before the mouseover? What am I missing? What should be taken out?...

<style
type="text/css"> <!-- A:link { text-decoration: none; color:#000000
} A:visited { text-decoration: none; color:#FF0066 } A:hover { text-decoration:
none; color:#FF0066 } --> </style>
<body><font face=tahoma size=3>
<hr size="1" width="750" color="#CCCCCC" align="left" noshade><center>
<a href="http://www.americanchic.net">home</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/handbags">handbags</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/shoes">shoes</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/jewelry">jewelry</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/sunglasses">sunglasses</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/sale">SALE</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/intheknow">In the Know</A></center>
<hr size="1" width="750" color="#CCCCCC" align="left" noshade>
</font>

Kevey
07-23-2007, 08:42 PM
You are missing a bunch of tags in your example (head,html, doctype etc). You may already have the right stuff in your original code, but if not it's worth considering to make sure you don't freak out the browser.

The below will fix your initial issues with color, but you have a lot more work to do to make it compliant.

<html>
<head>
<style type="text/css">
A:link { text-decoration: none; color:#000000;}
A:visited { text-decoration: none; color:#FF0066; }
A:hover { text-decoration: none; color:#FF0066; }
</style>
</head>
<body>
<font face=tahoma size=3>
<hr size="1" width="750" color="#CCCCCC" align="left" noshade>
<center>
<a href="http://www.americanchic.net">home</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/handbags">handbags</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/shoes">shoes</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/jewelry">jewelry</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/sunglasses">sunglasses</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/sale">SALE</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.americanchic.net/intheknow">In the Know</a>
</center>
<hr size="1" width="750" color="#CCCCCC" align="left" noshade>
</font>
</body>
</html>