3 replies [Last post]
davide77
Offline
newbie
Bern
Last seen: 10 years 18 weeks ago
Bern
Timezone: GMT+1
Joined: 2004-05-11
Posts: 8
Points: 0

hi,
it's getting difficult: is it possible to have a two words text link that react differently onmouseover: first word use some properties and the second word use other properties?

Any idea?

thanks

Arkkimaagi
Offline
Regular
Last seen: 10 years 18 weeks ago
Timezone: GMT+2
Joined: 2004-05-11
Posts: 29
Points: 0

a text link that react different to hover

Could you code it like this:

<a href="#">word1 <span>word2</span></a>

and css:

a{text-decoration:none;color:green;}
a:hover{text-decoration:underline;color:blue;}
a:hover span{text-decoration:none;color:red;}

~ Arkkimaagi ~
Experto credite

davide77
Offline
newbie
Bern
Last seen: 10 years 18 weeks ago
Bern
Timezone: GMT+1
Joined: 2004-05-11
Posts: 8
Points: 0

a text link that react different to hover

thanks again Arkk, it works fine

obsidian
Offline
Enthusiast
South Carolina
Last seen: 7 years 48 weeks ago
South Carolina
Joined: 2004-08-15
Posts: 136
Points: 0

a text link that react different to hover

As a newbie, I'd like to take this question a step further... when I use the above mentioned code, the <span> is still underlined with the <a> text-decoration. Is there any way around that, or any way to make an entirely different set of attributes for that specific word?

You can't win, you can't lose, you can't break even. You can't even get out of the game!