[thelist] text-decoration:none
Aylard JA (James)
jaylard at equilon.com
Mon Feb 26 20:01:37 CST 2001
Karen,
> trying to remove the underline from a link. i put the <span class='yada'>
> inside of the anchor - which overrode the anchor style..and my underline
is
> gone.
This really isn't the best way to do what you are trying to do. You
really should assign the property "text-decoration: none" to your anchor, or
to a class of anchors. Although not technically invalid, by placing a span
element within your anchor and setting its text-decoration property to none,
you are muddying up your code and potentially asking for trouble with some
browsers. The simplest way to do it is:
a:link, a:visited, a:hover, a:active {
text-decoration: none ;
}
or, more simply still:
a { text-decoration: none ; }
Netscape 4.x does not recognize the :hover and :active
pseudo-classes, and it applies the :visited pseudoclass to all links
regardless of their actual visited status. But IE 4+ and Netscape 6.x (and
Opera something-or-other) handle them alright.
James Aylard
More information about the thelist
mailing list