[thelist] Different coloured underline for links

Pixel Grafx pixel-grafx at attbi.com
Sun Mar 17 11:03:01 CST 2002


Kristina Floyd

Here's another way you might want to try:

a  
{
color: maroon;
text-decoration: none
}

a:hover
{
text-decoration: none;
color: black;
border-bottom: 1px solid red
}

This way you can change the 'height' of the underline.



> on Sunday, March 17, 2002, 4:11:47 PM, Kristina wrote:
>
> ::
>>   For example how do I create red text with a blue underline?
> ::
>
> I feel a bit ridiculous answering my own post, but I've worked it out
> now (typical!!)  So I thought I'd reply with the answer - just in case
> anyone else is interested!
>
> If anyone else has any other ways of doing this, I'd love to know
> about them, as I'm not sure how correct it is putting other tags
> inside <a> tags. It doesn't seem to be the ideal way of doing it.
>
> [external style sheet]
> a:link {
> color : #0000ff;
> text-decoration : none;
> }
>
> a:visited {
> color : #888888;
> }
>
> a:active, a:hover {
> color : #ff0000;
> text-decoration : underline;
> }
>
> .menuLink {
> color : #0000ff;
> }
>
>
> [html]
>
> <a href="linkname.htm"><span class="menuLink">The area</span></a>
>
> (will give a blue link with a red underline)
>
> --
> hth
> kristina




More information about the thelist mailing list