class? underline link

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi y'all,

I'm looking to put an underline under some links but not under others.  I
still want an underline when the link is hovered over.  I've dabbled with
classes for this, but all I can get is line or no line.

Any help?





<a class="1" href=" "> This link is not underlined...</a>

<a class="2" href=" "> This link IS underlined...</a>

Re: class? underline link

Mr. Newt wrote:
Quoted text here. Click to load it
Quoted text here. Click to load it

Can't speak in favor of class names like "1" and "2", but if they're
only example names, no problem.


Pondering the value of the UIP:

Re: class? underline link

Mr. Newt wrote:
Quoted text here. Click to load it

Firstly, these are not valid class names, class names cannot begin with
a number '0-9'

So for what you wish, your style 2 is the default so there is no need to
create a class and all we need to do is define a class for the
non-underlined links...

<style type="text/css">
a.special:link { text-decoration: none; }

/* underline when hoved & keyboard focus ... */
a.special:active { text-decoration: underline; }


<a class="special" href=" "> This link is not
underlined until hovered on in focus</a>

<a href=" ">This link IS underlined...the default</a>

Take care,


Re: class? underline link

Quoted text here. Click to load it

Thanks.  Just what I (my boss wanted) needed.

Re: class? underline link

Scripsit Mr. Newt:

Quoted text here. Click to load it

Just stop wanting that. Links love underlines. Links want to be links.

If you insist, though, learn how to use CSS and notice that this group is
about HTML, not CSS. And don't forget the read the fine FAQs of
comp.infosystems.www.authoring.stylesheets before posting there.

Quoted text here. Click to load it

So when the user _has_ recognized something as a link and has moved the
pointer on it, _then_ you would let the browser show, in its default way,
the usual clue of the text being a link. I wonder what makes people want
such things. And why don't they want to set the color of the text to a
typical link color but only _after_ the user has solved the puzzle?

Jukka K. Korpela ("Yucca")

Site Timeline