...

View Full Version : Hyperlink



hytechpro
11-23-2005, 10:44 AM
How can I create a hyperlink in HTML without underlying it.

Thanks.

http://www.hytechpro.com

mattyod
11-23-2005, 10:53 AM
Well there are four different attributes for a link in CSS. The following should make it all kind of clear.



a:link { text-decoration:none; }
a:visited { text-decoration:none; }
a:hover { text-decoration:underline; color: red }
a:active { text-decoration:none; }


Hope that helps :)

mattyod
11-23-2005, 11:02 AM
ooops I missed a semi colon after the color...



a:link { text-decoration:none; }
a:visited { text-decoration:none; }
a:hover { text-decoration:underline; color: red; }
a:active { text-decoration:none; }


fixed.

Bill Posters
11-23-2005, 11:17 AM
ooops I missed a semi colon after the color...



a:hover { text-decoration:underline; color: red; }



fixed.

Fwiw, the last item in a CSS rule doesn't require a closing semi-colon.
It's there to keep neighbouring properties clear and separate.
It's certainly a good habit to use them even on the last property of a rule, but just letting you know that it's optional and that the CSS isn't going to become invalid and the layout won't break if you happen miss it out.

An academic point, but just putting it out there. ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum