Links Without Underlines

S

SeeSchloss

Dena said:
How do I display a link in HTML without the underline?

Thanks for your help.

In CSS :
a {text-decoration:none;}
a:hover {text-decoration:none;} (if you don't want an underline when the
mouse is over the link)
 
E

Eric Bohlman

I'm curious why you would want to dismiss the underline...

In some contexts where it's easy to tell that a piece of text is in fact a
link (such as menu bars or menu panels), link items really do look better
if they aren't underlined. Of course, links embedded in narrative text
really *should* be underlined; users should not be expected to "play Myst"
in order to discover links. Basically you should err on the side of
caution: if there's any question as to whether or not something "looks like
a link" you should underline it. But some forms of navigation are so
stereotyped that users can be expected to recognize text in them as links,
and in those cases leaving off the underline often contributes to the
design without detracting from the usability.
 
E

e n | c k m a

a:hover {text-decoration:none;} (if you don't want an underline when the
mouse is over the link)

Isn't that inherited from the first a {} statement?
I've never needed to state text-decoration: none in the hover pseudo-class.
Is there something I'm unaware of?

Nicko.
 
R

rf

e n | c k m a said:
Isn't that inherited from the first a {} statement?

Why didn't you quote the first a {} statement. I had to search back through
the thread to find it.
I've never needed to state text-decoration: none in the hover pseudo-class.
Is there something I'm unaware of?

There was an if statememt in there.

if (you want no underline on all links)
a {text-decoration:none;}

if (you want no underline just on hover)
a:hover {text-decoration:none;}

Cheers
Richard
 
E

e n | c k m a

Why didn't you quote the first a {} statement. I had to search back
through
the thread to find it.

I realised before I sent it but thought you'd be able to figure it out.
Sorry.
There was an if statememt in there.

if (you want no underline on all links)
a {text-decoration:none;}

if (you want no underline just on hover)
a:hover {text-decoration:none;}

Ah, okay - thanks for clarifying.

Nicko.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top