Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ie. red links stay red but get yellow under line....??

Status
Not open for further replies.

unborn

Programmer
Jun 26, 2002
362
US
thats just an examply... or perhaps my link is black... and when they mouse over it it turns red with a purple underline.... i know its possible .. google.com and audiogalaxy has it... also even with out rollover whats the code for it as a normal link... anyone know how to do this? thanks ahead of time!
 
Hi

Check the FAQ's page or go here: faq215-1469


É

endamcg-logo1b.gif

 
Hi unborn,

try this example
- works in IE5.5,
- works not in IE4 and NN4
- I can't test NN6 here

As you can see, the color 'orange' (in :link and :visited has no effect anymore) but the font-weigth has !!

Don't put the onmouseover/-out in the <a> tag because then you get a blue underline and the font-color don't change. (It's the same effect as Link 1 with a lot more code)

You can change <font></font> to <span></span> if you want.

<HTML>
<HEAD>
<TITLE></TITLE>

<style>
.normal { COLOR:#C3C0EF; }

a.navi:link {text-decoration: none; font-weight: bold; color:eek:range}
a.navi:visited {text-decoration: none; font-weight: bold; color: orange}
a.navi:hover {color:red; text-decoration:underline;}
</style>
</HEAD>
<BODY>

<a class=&quot;navi&quot; href=&quot;date.asp&quot;><font class=&quot;normal&quot;>link 1 to datepage</font></a>
<br>
<a class=&quot;navi&quot; href=&quot;date.asp&quot;><font class=&quot;normal&quot; onmouseover=&quot;changeColors(this);&quot; onmouseout=&quot;changeBack(this);&quot;>link 2 to datepage</font></a>

<script language=&quot;javascript&quot;>
function changeColors(that)
{
that.style.color = 'blue'
}

function changeBack(that)
{
that.style.color = ''
}
</script>

</BODY>
</HTML>

Hope this helps,
Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top