Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > a:hover and the like

Reply
Thread Tools

a:hover and the like

 
 
WindAndWaves
Guest
Posts: n/a
 
      10-06-2004
Hi Gurus

I have been reading loads of info on this, but it seems I have read too
much.


Can someone help me out and tell me, in simple terms, what I should have on
my stylesheet for pseudo-classes for the anchor object.

Eg.

A { font-size: 15px;}
A:LINK {color: #123456;}
A:HOVER{color: #223456;}
A:VISITED {color: #323456;}

A.ANOTHER:HOVER {text-decoration: none;}

Basically, I am a bit unsure about the syntax for the pseudo classes (e.g.
do you use A:VISITED:HOVER or A:HOVER), and related matters.

TIA

- Nicolaas


 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      10-06-2004
In alt.html WindAndWaves said:

> A { font-size: 15px;}


avoid specifying font sizes in px. consider not specifying any size at
all so the visitors preferred sizes are used.

> A:LINK {color: #123456;}
> A:HOVER{color: #223456;}
> A:VISITED {color: #323456;}


they're in the wrong order.

link
visited
hover
active

see: http://www.w3.org/TR/REC-CSS2/select...pseudo-classes

> A.ANOTHER:HOVER {text-decoration: none;}


applies to <a class="ANOTHER" ...>

> Basically, I am a bit unsure about the syntax for the pseudo classes


http://www.w3.org/TR/REC-CSS2/select...seudo-elements

> do you use A:VISITED:HOVER


doesn't make sense.

> or A:HOVER)


will apply to all hovered <a>s

--
l i t t l e v o i c e s m a k e m e
 
Reply With Quote
 
 
 
 
bulge
Guest
Posts: n/a
 
      10-06-2004
On Thu, 7 Oct 2004 00:01:03 +1300, "WindAndWaves" <(E-Mail Removed)>
wrote:

>Hi Gurus
>
>I have been reading loads of info on this, but it seems I have read too
>much.
>
>
>Can someone help me out and tell me, in simple terms, what I should have on
>my stylesheet for pseudo-classes for the anchor object.
>
>Eg.
>
>A { font-size: 15px;}
>A:LINK {color: #123456;}
>A:HOVER{color: #223456;}
>A:VISITED {color: #323456;}


looks good. Could also put the a:active thingy in if you wanted.

>
>A.ANOTHER:HOVER {text-decoration: none;}


looks good. "another" being a class named Another (note the dot)

>
>Basically, I am a bit unsure about the syntax for the pseudo classes (e.g.
>do you use A:VISITED:HOVER or A:HOVER), and related matters.


a:hover.
a.visited:hover would probably work if you created a class called
"visited" (note the dot), but not a:visited:hover (note the colon).
Dunno if there's a separate hover for visited links, but I doubt it,
and am too lazy to find out

I could be totally wrong since I found this confusing when starting
with CSS too, and sometimes I feel I have learned nothing so I'm
happy to be corrected.

Recent nightmare CSS session has made me loopy.

>
>TIA
>
>- Nicolaas
>



 
Reply With Quote
 
SpaceGirl
Guest
Posts: n/a
 
      10-06-2004
WindAndWaves wrote:
> Hi Gurus
>
> I have been reading loads of info on this, but it seems I have read too
> much.
>
>
> Can someone help me out and tell me, in simple terms, what I should have on
> my stylesheet for pseudo-classes for the anchor object.
>
> Eg.
>
> A { font-size: 15px;}
> A:LINK {color: #123456;}
> A:HOVER{color: #223456;}
> A:VISITED {color: #323456;}
>
> A.ANOTHER:HOVER {text-decoration: none;}
>
> Basically, I am a bit unsure about the syntax for the pseudo classes (e.g.
> do you use A:VISITED:HOVER or A:HOVER), and related matters.
>
> TIA
>
> - Nicolaas
>
>


a.whateverseudoclass

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      10-06-2004
brucie <****@usenetshit.info> wrote:
>In alt.html WindAndWaves said:
>
>> do you use A:VISITED:HOVER

>
>doesn't make sense.


Yes it does. :visited and :hover are not mutually exclusive and - a
link can be bother visited and hovered.

Under the proposed CSS3 selectors the above is logical and is already
supported by some browsers.

>> or A:HOVER)

>
>will apply to all hovered <a>s


Including those that aren't links. Using a:link:hover and
a:visited:hover means that the hover styles are only applied to links
not to <a name="foo"> elements.

The browsers that support :visited:hover are also those that apply
a:hover to all <a> elements.

Steve

 
Reply With Quote
 
Sid Ismail
Guest
Posts: n/a
 
      10-06-2004
On Thu, 7 Oct 2004 00:01:03 +1300, "WindAndWaves" <(E-Mail Removed)> wrote:

: Hi Gurus
:
: I have been reading loads of info on this, but it seems I have read too
: much.
:
:
: Can someone help me out and tell me, in simple terms, what I should have on
: my stylesheet for pseudo-classes for the anchor object.
:
: Eg.
:
: A { font-size: 15px;}
: A:LINK {color: #123456;}
: A:HOVER{color: #223456;}
: A:VISITED {color: #323456;}
:
: A.ANOTHER:HOVER {text-decoration: none;}
:
: Basically, I am a bit unsure about the syntax for the pseudo classes (e.g.
: do you use A:VISITED:HOVER or A:HOVER), and related matters.


CSS pseudo-classes

A.blue:visited {color: #003399;}
A.blue:link {color: #003399;}
A.blue:active {color: #003399;}
A.blue:hover {color: red;}

A.white:visited {color: #ffffff;}
A.white:link {color: #ffffff;}
A.white:active {color: #ffffff;}
A.white:hover {color: red;}

and then -

<a href="blah1.html" class="blue">Blue Link</a>
<a href="blah2.html" class="white">White Link</a>


Sid


 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      10-06-2004
Quoth the raven Sid Ismail:

> CSS pseudo-classes
>
> A.blue:visited {color: #003399;}
> A.blue:link {color: #003399;}
> A.blue:active {color: #003399;}
> A.blue:hover {color: red;}
>
> A.white:visited {color: #ffffff;}
> A.white:link {color: #ffffff;}
> A.white:active {color: #ffffff;}
> A.white:hover {color: red;}


Las Vegas Has Animals

link
visited
hover
active

If not in this order, will not work as you wish.

--
-bts
-This space intentionally left blank.
 
Reply With Quote
 
WindAndWaves
Guest
Posts: n/a
 
      10-06-2004
"WindAndWaves" <(E-Mail Removed)> wrote in message
news:4gQ8d.10406$(E-Mail Removed)...
> Hi Gurus
>
> I have been reading loads of info on this, but it seems I have read too
> much.
>
>
> Can someone help me out and tell me, in simple terms, what I should have

on
> my stylesheet for pseudo-classes for the anchor object.
>
> Eg.
>
> A { font-size: 15px;}
> A:LINK {color: #123456;}
> A:HOVER{color: #223456;}
> A:VISITED {color: #323456;}
>
> A.ANOTHER:HOVER {text-decoration: none;}
>
> Basically, I am a bit unsure about the syntax for the pseudo classes (e.g.
> do you use A:VISITED:HOVER or A:HOVER), and related matters.
>
> TIA
>
> - Nicolaas
>
>



Thank you for all your replies.

So what I learn is that it actually matters what sequence the items are in.
I never knew that css actually needs to have a special sequence, is that
true? I thought the cascading referred to the hierarchy within the HTML
page only.

Thank you once more. I would still be keen to hear if my idea listed above
is true?

- Nicolaas


 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      10-06-2004
In alt.html WindAndWaves said:


> I never knew that css actually needs to have a special sequence, is that
> true?


yes

6 Assigning property values, Cascading, and Inheritance
http://www.w3.org/TR/REC-CSS2/cascade.html


--
l i t t l e v o i c e s m a k e m e
 
Reply With Quote
 
Matt-The-Hoople
Guest
Posts: n/a
 
      10-06-2004
In news:t6Y8d.139754$(E-Mail Removed),
Beauregard T. Shagnasty <(E-Mail Removed)> walked into the bar
with a grape in each nostril and said to the bartender:

:: Las Vegas Has Animals

And here I thought it was "Leave Valerie's Hoo-hoo Alone"

-- Matt


 
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
don't like, so don't waste your time thinking and buy them. You know,if you don't like one thing, it means nothing for you.</p> fashion t shirts seller Cisco 0 06-13-2011 02:01 AM
need help while designing yahoo messenger like yahoo and msn , like on meebo.com checoo C++ 1 12-25-2006 03:19 PM
need help while designing yahoo messenger like yahoo and msn , like on meebo.com checoo C++ 0 12-25-2006 02:33 PM
object-like macro used like function-like macro Patrick Kowalzick C++ 5 03-14-2006 03:30 PM
DVD Verdict reviews: LIKE FATHER, LIKE SON, THE CODE, and more! DVD Verdict DVD Video 0 06-18-2004 09:03 AM



Advertisments