Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > style sheet a:hover

Reply
Thread Tools

style sheet a:hover

 
 
Luc
Guest
Posts: n/a
 
      02-14-2004
Hello,

In a style sheet i defined this :

a:link { text-decoration: none;}
a:hover { text-decoration: underline;}
a:visited { text-decoration: none;}
a:active { text-decoration: none;}

i cannot understand why the link is not underlined when the mouse is over...


 
Reply With Quote
 
 
 
 
Luc
Guest
Posts: n/a
 
      02-14-2004
(message sent before i finished writing

Hello,

In a style sheet i defined this :

a:link { text-decoration: none;}
a:hover { text-decoration: underline;}
a:visited { text-decoration: none;}
a:active { text-decoration: none;}

i cannot understand why the link is not underlined when the mouse is over...

thanks for your help


 
Reply With Quote
 
 
 
 
Inger Helene Falch-Jacobsen
Guest
Posts: n/a
 
      02-14-2004
Luc wrote:
> (message sent before i finished writing
>
> Hello,
>
> In a style sheet i defined this :
>
> a:link { text-decoration: none;}
> a:hover { text-decoration: underline;}
> a:visited { text-decoration: none;}
> a:active { text-decoration: none;}
>
> i cannot understand why the link is not underlined when the mouse is
> over...
>
> thanks for your help


You have to put the "commands" in the right order. Try this:

a:link { text-decoration: none;}
a:visited { text-decoration: none;}
a:hover { text-decoration: underline;}
a:active { text-decoration: none;}

--
Inger Helene Falch-Jacobsen
http://home.online.no/~ingerfaj/


 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      02-14-2004
Luc wrote:

> (message sent before i finished writing
>
> Hello,
>
> In a style sheet i defined this :
>
> a:link { text-decoration: none;}
> a:hover { text-decoration: underline;}
> a:visited { text-decoration: none;}
> a:active { text-decoration: none;}
>
> i cannot understand why the link is not underlined when the mouse is over...


You probably already visited the link once.
And a:visited was defined after a:hover, so it 'goes for'
the a:visited style.

Stick to the order:
a:link { text-decoration: none;}
a:visited { text-decoration: none;}
a:active { text-decoration: none;}
a:hover { text-decoration: underline;}

> thanks for your help


You're welcome

--
Els

Mente humana como pra-quedas; funciona melhor aberta.

 
Reply With Quote
 
picayunish
Guest
Posts: n/a
 
      02-14-2004
Inger Helene Falch-Jacobsen wrote:
> Luc wrote:
>
>>(message sent before i finished writing
>>
>>Hello,
>>
>>In a style sheet i defined this :
>>
>>a:link { text-decoration: none;}
>>a:hover { text-decoration: underline;}
>>a:visited { text-decoration: none;}
>>a:active { text-decoration: none;}
>>
>>i cannot understand why the link is not underlined when the mouse is
>>over...
>>
>>thanks for your help

>
>
> You have to put the "commands" in the right order. Try this:
>
> a:link { text-decoration: none;}
> a:visited { text-decoration: none;}
> a:hover { text-decoration: underline;}
> a:active { text-decoration: none;}


Why not a:link, a:active, a:visited, a:hover in order of commands?
--
Edwin van der Vaart
http://www.semi-conductor.nl/ Links to Semiconductors sites
http://www.evandervaart.nl/ Under construction
 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      02-14-2004
Els wrote:

> Stick to the order:
> a:link { text-decoration: none;}
> a:visited { text-decoration: none;}
> a:active { text-decoration: none;}
> a:hover { text-decoration: underline;}


Depending on the effect you are trying to create, you will probably want
:hover before :active.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      02-14-2004

Toby A Inkster wrote:

> Els wrote:
>
>
>>Stick to the order:
>>a:link { text-decoration: none;}
>>a:visited { text-decoration: none;}
>>a:active { text-decoration: none;}
>>a:hover { text-decoration: underline;}

>
> Depending on the effect you are trying to create, you will probably want
> :hover before :active.


Yes, I was thinking about that, but couldn't resolve the
answer. I was thinking: if a link is active (meaning the
page connected by that link is open, maybe in another
window, right?), and then you hover over it.. does it have
to show you are hovering, or not?
Or maybe active means just the fraction of a second that you
are pressing the link?

On the site I did, I ignored this whole issue, by not using
the a:active styles at all


--
Els

Mente humana é como pára-quedas; funciona melhor aberta.

 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      02-14-2004
picayunish wrote:

> Why not a:link, a:active, a:visited, a:hover in order of commands?


Because[1] you can't have a link :active without it also being :hover. So
the :hover declaration would override the :active declaration (as
would :visited)

[1] At least when a pointing device is being used for navigation.

--
David Dorward <http://dorward.me.uk/>
 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      02-14-2004
Els wrote:

> Or maybe active means just the fraction of a second that you
> are pressing the link?


Yep, that's it. Go to:

http://www.goddamn.co.uk/tobyink/set...?style=default

Click on the links and you should notice a lime colour for active links.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      02-14-2004
Toby A Inkster wrote:

> Els wrote:
>
>
>>Or maybe active means just the fraction of a second that you
>>are pressing the link?

>
> Yep, that's it. Go to:
>
> http://www.goddamn.co.uk/tobyink/set...?style=default
>
> Click on the links and you should notice a lime colour for active links.


Yep, nice colour too
Okay, so I'd say the order has to be link, visited, hover,
active then.
I stand corrected.
Thanks

--
Els

Mente humana é como pára-quedas; funciona melhor aberta.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Page specific style style sheet rshillington@gmail.com ASP .Net 0 07-14-2006 03:45 PM
Firefox screwing with my style sheet margins! Bill Firefox 14 11-18-2005 03:30 PM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM
Cascading Style Sheet Jim Heavey ASP .Net 3 11-19-2003 06:14 PM
Adding style sheet dynamicaly Marc Nederhoff ASP .Net 2 11-05-2003 04:56 PM



Advertisments