free
This is our archive, please go to the main forum page for the latest discussions and news about free web hosting.


Link Underline...

WebEx
February 24th, 2002, 09:29
How do you make the a link underline a different color? I know you can just change the link color, but I want to know how people make the link blue, for example and change the underline to orange, for example.....

Know how?

_Street_Fighter
February 24th, 2002, 10:17
use this: click here (http://www.dynamicdrive.com/dynamicindex5/linkover.htm)

meow
February 24th, 2002, 10:47
Ock ock ock. If you have seen it in version 6 of IE or Opera it may be the below. Otherwise, maybe some trick with borders or in simplest case a fake underline with a 1 pixel gif.

You may have to use a proper DTD to force IE6 into strict mode to render this, but have a go like this first. I don't have IE6 installed and would like to know if it works in quirk mode.

The trick is that you set the underline on the div and the a's inherit it _with_ the color from the div.

<html>

<head>
<title></title>
<style type="text/css">
<!--
#nav { width: 30%; padding-left: 10px; color: #ff0000; background: #eeeeee none; text-decoration: underline }

#nav a { color: #0000ff; background: transparent none }
-->
</style>

</head>

<body>

<div id="nav">
<a href="yadda.html">Yadda yadda yadda yadda</a><br>
<a href="yadda.html">Yadda yadda yadda yadda</a><br>
<a href="yadda.html">Yadda yadda yadda yadda</a><br>
<a href="yadda.html">Yadda yadda yadda yadda</a>
</div>

</body>
</html>

Dusty
February 24th, 2002, 15:25
Otherwise, maybe some trick with borders or in simplest case a fake underline with a 1 pixel gif.You can use a background image to imitate an underline as well. Using that you can get the underline to change colors with the link on hover... which I guess you could do with an image underneath it, too, but it would be a lot easier.

meow
February 24th, 2002, 15:40
Did I misread his question? Does he want the underline to have the same color as the link? I thought he wanted one color for the text and one for the actual underline. Sheesh. :confused2

Anyway, could someone that have IE6 please check if the above works as expected as it is without a DTD? I'm curious. :p

Dusty
February 24th, 2002, 15:44
Did I misread his question? Does he want the underline to have the same color as the link? I thought he wanted one color for the text and one for the actual underline.Yes, he wants it a different color. If he didn't, well, matters would be greatly simplified, wouldn't they? I was just saying that if he wanted the underline to change color when the mouse is over the link (further giving the impression that it was a real underline), a background image would do.

<edit> ...and all this is in regard to your comment on how to fake it, I have no idea what that other stuff you're doing is. I'll assume it's the real but ill-supported way </edit>

meow
February 24th, 2002, 15:50
And change the image on hover you mean? Yeah, that would work.

WebEx
February 24th, 2002, 19:02
Thanks everyone! :biggrin2: (I like that smilie! :biggrin2: :biggrin2: :biggrin2: :biggrin2: !!!!)





  
  News · Search free hosts · Free file hosting · Free image hosting · Reviews · Forums · Related Links · Advertising Info · Contact Us


Copyright © 1996-2008 Per Olof Sandholm. All rights reserved. Privacy Statement

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum