Click to See Complete Forum and Search --> : Overriding hyperlink style
essjay_d12
03-13-2006, 10:36 AM
How do you override the default style of a hyperlink?
One, i do not want the underline
2, I want the colour that my style sheet tells it it should be.
At the moment it's changed to a blue underline link.
http://www.w3schools.com/css/css_pseudo_classes.asp
comptech520
03-13-2006, 01:16 PM
One thing now a days is to get HEAVALY involved with CCS. Its not to painful, but its the wave of the future. If you have any questions, don't hesitate to ask in the forum!!
pcthug
03-13-2006, 05:39 PM
a, a:visited {color: #987654; text-decoration: none;}
The a, a:visited selector sets the succeding styles to be applied to both normal links & visited links.
The color: property sets the color of the hyperlink (see: Supported Color's (http://www.w3schools.com/css/css_colors.asp)),
and the text-decoration: property sets as to what style of text decoration (or underline) style - which in our case the value is set to none
http://www.w3.org/TR/CSS21/selector.html#link-pseudo-classes
http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes
Bytes
03-13-2006, 06:31 PM
Use pcthug script for the link color(s) and this to remove the “underline” for the link:
<style type="text/css">
<!--
A:link {text-decoration: none;}
A:visited {text-decoration: none;}
-->
</style>
Regards,