link hover effect help

R

rrreee

Hi... If I have a link that contains a line break (link consists of two
words, one on top of the other) and I want a underline to appear ONLY on the
bottom line of text, how can this be done? Right now the underline effect
appears under both lines of text when hovering.


thanks
 
A

Adrienne Boswell

Hi... If I have a link that contains a line break (link consists of
two words, one on top of the other) and I want a underline to appear
ONLY on the bottom line of text, how can this be done? Right now the
underline effect appears under both lines of text when hovering.


thanks

Then change the link content.
 
M

M

I think if that's what he wants to do he would have done it...

I think previous poster is saying there is no other way to do it. It goes
with the tag -- you can't make only part of the link tag appear underlined.

M
 
J

Jonathan N. Little

M said:
I think previous poster is saying there is no other way to do it. It goes
with the tag -- you can't make only part of the link tag appear underlined.

Not sure why but...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">

<title>template</title>

<style type="text/css">
a.veryOdd { display: block; text-decoration: none; }
a.veryOdd span { display: block; }

/* you must set something directly to the pseudo
class else MSIE will not apply the rult to the
following child rule!
*/
a.veryOdd:hover { color: red; }
a.veryOdd:hover span { text-decoration: underline; }

</style>


</head>
<body>

<p>
Is this what you mean?
<a href="#" class="veryOdd">Double <span>Decker</span></a>
</p>
</body>
</html>
 
M

M

Okay, that's clever. It's one of those obvious "now why didn't I think of
that" things. . .

Good one.

M
 
A

Adrienne Boswell

<p>
Is this what you mean?
<a href="#" class="veryOdd">Double <span>Decker</span></a>
</p>

I was going to suggest that, but I have some problems with it. "A link
wants to be a link" AND a link should make sense out of context. Decker
makes no sense, Double Decker does. Hense my previous post to change the
link text.
 
J

Jonathan N. Little

Adrienne said:
I was going to suggest that, but I have some problems with it. "A link
wants to be a link" AND a link should make sense out of context. Decker
makes no sense, Double Decker does. Hense my previous post to change the
link text.
I did preface that I did not know why one should want to do this. I am
in no way advocating one *should* do it, just that it can be done.

Can be done but one shouldn't!

a.blink { display: inline; }
a.blink:hover { display: block;}
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top