Forum Moderators: not2easy

Message Too Old, No Replies

Advanced Class Definition - Syntax Question

Help interpreting an advanced class definition

         

k vanderstarren

11:07 pm on Sep 2, 2003 (gmt 0)

10+ Year Member



Hi All,

I am new to CSS so please forgive me if I'm about to ask a dumb question.

I came across the following code on a website that I was visiting and I was hoping that someone here could help me interpret it.

div.myclass a:hover{
/* some stuff here */
}

If I understand everything that I've read about CSS, "div" is the selector, "myclass" is the class and "hover" is the pseudo class.

What I'm confused about is that I've never seen a definition as complicated as this ... the most complicated I've seen is something like: a.myclass:hover{ /* some stuff */ }

Can someone please explain exactly what the first definition says in plain English? Does it say: "apply the following formatting to links that are contained in a div of class myclass?" Also, is it valid within all browsers?

tedster

11:17 pm on Sep 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, k_vanderstarren

This rule defines a specific hover behavior that will occur ONLY on anchor tags within divs that have the specified class (myclass).

k vanderstarren

12:39 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



Thanks tedster. :)