A: Classes (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


Peppergal -> A: Classes (3/11/2004 11:03:11)

If I want a second class of link properties, does the hover and visited that are under the link follow the class set for link?, or do I have to give each one the class name:

Meaning, can I do this:

a: link.two {color: red;}
a: hover {color: white}
a: visited {color: blue}

or do I need to do this

a: link.two
a: hover.two
a: visited.two

to keep the hover and visited from following the default settings under the main link properties?

des that make sense?




Giomanach -> RE: A: Classes (3/11/2004 11:07:36)

I'm sure it's:

.two a:link{color:red;}

and so on, just assign the class to the table cell the link is in.




Peppergal -> RE: A: Classes (3/11/2004 11:40:07)

thanks - now next duh question...do I have to put that .two before each part - meaning, .two A:hover, .two A:visited ?




Giomanach -> RE: A: Classes (3/11/2004 11:40:51)

Yup, can I go home now?




Peppergal -> RE: A: Classes (3/11/2004 11:42:35)

I say "duh" because I really should know this but my brain is still stuck with play doh and glue sticks, Clovis of the Franks, telling time, bible lessons, pet mice, and shopping cart choices.




Giomanach -> RE: A: Classes (3/11/2004 11:44:23)

I can tell your mind isn't where it should be, take a break, sounds like you need one, anyways, I'm off home, if you need me, you know how to get hold of me




bobby -> RE: A: Classes (3/11/2004 12:47:09)

I've always done it this way:

a.two:link {
}

and they should be in this order...

link
visited
hover
active




Peppergal -> RE: A: Classes (3/11/2004 19:40:24)

Thanks Bobby...that's what I saw previously. Up till now I never needed two classes of link colors so only gave it a cursory glance. I tend to wait till I need something then find it out. Not always a good thing....

my brain is more clear tonight.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
3.198242E-02