How to remove hyperlink underline

gavin681's picture

They have: 184 posts

Joined: May 2001

Hi,

I've tried everything but can't figure out how to remove an underline from a text link. Is this possible?

I want the underline to appear when moused over only. Can this be done?

The web page I'm trying to do this on is:
http://www.advancedwebsitepromotion.com/bahamaswriter.htm

As you can see I can make it disappear on mouse over but I want the opposite effect.

Can any one help me? I would appreciate it greatly.

Thanks,
Gavin

The Webmistress's picture

She has: 5,586 posts

Joined: Feb 2001

You want to use something like this :

a { color: #000080; text-decoration: none; }
a:hover { color: #FF6600; text-decoration: underline;}

gavin681's picture

They have: 184 posts

Joined: May 2001

Thanks Webmistress,

I'm a HTML dummy. I design using Front Page. Where do I insert this HTML? I tried putting in the head but still the underline appears before the mouse over. I want to get rid of the underline in hyperlinks. Only when moused over do I want the underline to appear. Is this possible or do I have to make two separate images and use java script?

Gavin

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

Put it in the head between a style tag like so:

a { color: #000080; text-decoration: none; }
a:hover { color: #FF6600; text-decoration: underline;}

You have a couple of other tags to consider like

A:link
A:visited
A:active

Otherwise, you visited links will probably be magenta. My preference is for them to be the same color as the A link.

Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states

taff's picture

They have: 956 posts

Joined: Jun 2001

Keep in mind..

If the actual tags have style attributes, this will (should) take precedence over anything you've outlined in the style block.

gavin681's picture

They have: 184 posts

Joined: May 2001

Thanks mairving!

Great! That worked. Smiling

Gavin

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Not to be overly anal or anything, but the correct syntax for using a local stylesheet (CSS) is:

type="text/css">

This will make it work even in browsers that aren't so smart, and also those that are so smart that they require you to be accurate in your coding.

Smiling Suzanne

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

Quote: Originally posted by Suzanne
Not to be overly anal or anything

Care to wager on that anal thing? LOL

Anyway, yes it should have the type="text/css". I guess it has been a long time since I have used that one since I use external stylesheets myself.

Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

It's a curse, I know, but I was born with it and it'll take time to excise it from my personality!

Wink Suzanne

openmind's picture

He has: 945 posts

Joined: Aug 2001

Quote: Originally posted by Suzanne
Not to be overly anal or anything

Hey nothing wrong with being overly anal, my missus has often said I suffer from verbal diarrhoea Shocked

They have: 20 posts

Joined: Sep 2001

Thats what i use.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Quote: Originally posted by Metatrox

Thats what i use.

That has a couple of errors, Metatrox -- "Font-family" is not an element, and should be enclosed in curly braces as the declaration of an element, not on its own. Secondly, the HTML comment needs to be preceded by the JavaScript comment //.

Smiling Suzanne

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.